#django

/

      • unit923
        then it process another batch of 6
      • and then bails
      • ....
      • it missed that 20
      • alukach has quit
      • sima
        unit923, I'm pretty sure order and filter conditions will solve your problem. Also, jump into paginator and see what's happening there, step by step. I'm pretty sure you'll see the source of confusion
      • unit923
        thanks for that, i'm adding order by id now
      • order by id didnt help...
      • there's something weird going on here :)
      • ok thanks for that though; it cleared some stuff up though, i'll dig deeper
      • TomTomTosch joined the channel
      • alukach joined the channel
      • ycon_ has quit
      • sima
        does anyone have experience in upgrading django 1.8 -> 1.9?
      • pyface has quit
      • I'm sure it's widespread practice to import models in views, which in turn referenced by urlconf. I'm interested in how other peers have solved that problem
      • TomTomTo1 has quit
      • Qchmqs__ joined the channel
      • Qchmqs__ is now known as Qchmqs
      • k3rn3lwalk3r joined the channel
      • Ryanar has quit
      • k3rn3lwalk3r
        what is the way to add auto increment id while fectching record in django template
      • *display
      • ycon_ joined the channel
      • sima
        k3rn3lwalk3r, you a model method when do necessary increment
      • and just call it from the template
      • sol1x has quit
      • mayhew joined the channel
      • k3rn3lwalk3r
        didnt got you.
      • Ryanar joined the channel
      • ycon_ has quit
      • {% for data in Buildings %} (print record number ) (print record) {% endfor %}
      • raijin joined the channel
      • i just want a veritable which increment every time record is fetched and i can print it in record number
      • i did that before now forgot how to do this
      • remembered it it was {{ forloop.counter }}
      • kyheo joined the channel
      • unit923 has quit
      • RonWhoCares has quit
      • SimpleName has quit
      • kyheo has quit
      • amcorreia joined the channel
      • raijin has quit
      • Haudegen joined the channel
      • shredding joined the channel
      • raijin joined the channel
      • tourdownunder joined the channel
      • finster
        hello all. i've got a question regarding structuring the source of a djang project. is it considered good or bad practice to have one file per model?
      • *django
      • Ryanar has quit
      • emacsen
        finster, it depends on you/the size of the project. I eventually did that when my project became big enough
      • or what I actually did was one file per "model and related models"
      • finster
        emacsen: ah, i see
      • emacsen
        finster, the other thing you may want to consider is if your project gets that big, splitting into multiple apps
      • finster
        i'm not there yet (splitting into multiple apps, that is)
      • Guard1an joined the channel
      • emacsen: i like your nick ;
      • emacsen
        finster, thanks
      • maks25
        any chance anyone can help me setting up celery with systemd?
      • celery.service: Failed at step CHDIR spawning /bin/sh: No such file or directory
      • but /bin/sh exists…..
      • enttree joined the channel
      • shredding has quit
      • finally got it to workkkk
      • Draggor has quit
      • enttree has quit
      • raijin has quit
      • superB__ joined the channel
      • pastry has quit
      • daze6 joined the channel
      • emacsen has quit
      • shredding joined the channel
      • daze6
        hey guys, I'm kinda bad test writer and I need an advice :/
      • I have custom manage.py command, which downloads pretty big json data with requests
      • pastry joined the channel
      • then, some particular data is extracted from json and stored in default db
      • and here comes the question - what should I test? I've already made tests which cover Command.handle() behaviour depending on optional argument
      • I also have some local test data (like 1/100000 of the original data) and there are tests which check if it's being stored in db correctly
      • orf_ joined the channel
      • shredding has quit
      • anything else I should test, that comes to your minds, guys?
      • raijin joined the channel
      • OskrGrme joined the channel
      • RonWhoCares joined the channel
      • Cyph0n joined the channel
      • kyheo joined the channel
      • raijin has quit
      • CAPITANOOO joined the channel
      • Xiti has quit
      • milardovich joined the channel
      • CAPITANOOO has quit
      • milardovich has quit
      • Or1on joined the channel
      • juantamad123 joined the channel
      • Or1on has quit
      • Lobstaman3 joined the channel
      • kupi joined the channel
      • sima
        still nobody who did upgrade django 1.8 -> 1.9?
      • orf_
        I'm sure lots of people did sima
      • in fact everyone who is on 1.8 and is now post 1.8 did
      • sima
        that's right. I've asked a question three times and nobody responded me :(
      • the question: I'm sure it's widespread practice to import models in views, which in turn referenced by urlconf. I'm interested in how other peers have solved that problem
      • and original question with more info: The problem stems from django's system check framefork and the fact that it does import urlconf on startup. This all happens during(or even before) apps registry is populated with models. And in views we heavily importing models. Right now I'm not sure how to proceed further: either disable all url-related checks or move models imports from views to ... - there's no answer where I could move those, and I'm very against do
      • ing all imports lazily, either inside views or deferring imports to actual usage time
      • orf_
        hmm, I've never run into an issue like that
      • I assumed the system checks happen after the models are loaded
      • in fact I'm pretty sure they do
      • in fact, they have to
      • you can add system checks to models sima
      • orf_ has quit
      • orf_ joined the channel
      • juantamad123 has quit
      • sima
        orf_, hmm, not sure how that would happen. but thx for the hint, I need to verify that system check happen after models are loaded, and check why I've got different from that behavior
      • plus65Naomi has quit
      • superB__ has quit
      • stormy1 joined the channel
      • bed666 has quit
      • daze6
        Damn, still no word about those tests I've asked before :(
      • Now I'm sad
      • mastizada joined the channel
      • enttree joined the channel
      • kartik joined the channel
      • sima
        dazm, don't be. life is good
      • daze6, I would also test how do you handle network failures
      • also, imo it's not a good idea to have manage.py doing such a job. rather another, separate management command/script
      • daze6
        it is
      • I mean it is a command
      • I might have used wrong words before :-P
      • I use it like this "python manage.py <command name>"
      • t2mkn joined the channel
      • vlt
        sima: I went from 1.8 to 1.11 without problems for my (two) projects. I have all my imports at the top of each module.
      • sima
        vlt, hm. then I'll have to re-check that again, because I had not much time to investigate there. just spotted in traceback that the problem is happening after system checks do import urls. probably I've got wrong lane because of that initially. thx
      • kyheo has quit
      • enttree has quit
      • kyheo joined the channel
      • Xiti joined the channel
      • kyheo_ joined the channel
      • kyheo has quit
      • kyheo_ has quit
      • Leeds has quit
      • kyheo joined the channel
      • Digitaltom_ has quit
      • stormy1 has left the channel
      • iiie0 has quit
      • kyheo has quit
      • superB__ joined the channel
      • Lobstaman3 has quit
      • milardovich joined the channel
      • kyheo joined the channel
      • t2mkn has quit