#django

/

      • Hello71 has quit
      • GinFuyou
        webs, damn, please pick your class names better then! ^_^"
      • webs
        xD
      • GinFuyou: we need to just get outa this problem cause its been almost a day
      • xcm joined the channel
      • since ive been trying
      • Hello71 joined the channel
      • and then i came to ask
      • but ive already been tryng from almost a day lol
      • it keeps saying image.cropper is not a function
      • fikka joined the channel
      • GinFuyou
        you names just confuse me and make longer to grasp code flow
      • webs
        ill amend that xD
      • GinFuyou
        Does print on line 240 fire?
      • ysch has quit
      • rpkilby joined the channel
      • webs
        let me check
      • jessamynsmith joined the channel
      • no it doesnt print anything
      • GinFuyou
        I guess it doesn't and that form is invalid which is not handled in the view
      • webs
        instead it prints that https://dpaste.de/HjkO
      • and continues
      • GinFuyou
        let's put it aside for now
      • mitaka has quit
      • You want to handle form errors in that view so you can know what goes wrong
      • webs
        omg yeah the form is invalid as i made an else: print("ddddddddddddddddddd") it prints that
      • GinFuyou
        explore form.errors
      • webs
        after it prints the error (the error i gave on dpaste: https://dpaste.de/HjkO)
      • so it prints error thingy then dddddddddddddddddddd
      • it might be all because of the image crop not appearing right?
      • it says $image.cropper is not a function
      • GinFuyou
        webs, please stop trying to solve 42 issues at once
      • Check form errors
      • webs
        yeah
      • :P
      • i mean the form was working fine before i introfuced this croppingthingy so i thought this cropping thingy might have been causing problem
      • Xard joined the channel
      • taylorhere_ joined the channel
      • GinFuyou
        it probably did, but let's be consistent step by step
      • webs
        yeah xD
      • vdboor has quit
      • Gueeros joined the channel
      • darkhanb has quit
      • streuner has quit
      • BPL joined the channel
      • metajake joined the channel
      • RandomSerb
        does view need to return an HTTPResponseObject always?
      • I'm trying to have an dispatch view to check on which view should be called. And I wrote it like: https://dpaste.de/52qr
      • The view dashboards.views.dashboard_dispatcher_main didn't return an HttpResponse object. It returned None instead.
      • metajake
        Hi all. I'd like to develop my site CSS using SASS with the Django-Pipeline library ( it compiles your SASS files into CSS ). Django-Pipeline uses template tags to trigger the SASS compilation. On my host, I'd rather not perform this compilation every time a user visits a page. I'd rather just reference the static (precompiled) CSS files. ... Might anyone have any insight into how I can perform compilation in d
      • evelopment and avoid it in production?
      • EyePulp joined the channel
      • jtiai
        RandomSerb: Yes, views must return HTTPResponse or one of it's subclasses.
      • RandomSerb
        jtiai: is there any better way to do what I'm trying to do here?
      • jtiai
        RandomSerb: different urls would be better (you could have redirecting index view). Problem is that if same url can contain same contents it's caching will be tricky.
      • krawchyk joined the channel
      • GinFuyou
        RandomSerb, it returned None because most likely you hit else: case
      • RandomSerb
        GinFuyou: both are the same
      • none of the cases would return anything, explicitely
      • GinFuyou
        Ok then
      • RandomSerb
        I just thought that if I call a method that returns something, that would act automagically as an middle man, and assume it should return that
      • but not, that's too much to ask, obviously
      • jtiai
        RandomSerb: Well that's not how Python works :D
      • RandomSerb
        yeah :)
      • GinFuyou
        you want return at least, yeah
      • Wooble
        that kind of thinking is why everyone writing their first recursive function forgets a return. :)
      • GinFuyou
        missed it
      • Leeds has quit
      • webs
        GinFuyou: do you nknow how to do a console.log in ajax?
      • GinFuyou
        not sure what you mean
      • webs
        so we could check the variables #id_x etc
      • GinFuyou
        You don't need ajax for it
      • UncleVasya_ joined the channel
      • fpghost84 joined the channel
      • webs
        we could do it through js?
      • Iki_90 has quit
      • nimbleark joined the channel
      • sarenn joined the channel
      • GinFuyou
        I don't see how ajax can help with it? sending data to django and checking them server side? What for?
      • webs
        no for the croppingn part
      • Gueeros has quit
      • UncleVasya has quit
      • fpghost84
        I've set my default `TEST_RUNNER` to nose, and in circleCI I run tests with the following snippet https://paste.ofcode.org/ejQj9ArWdusUkMFH74Cxpb (my NOSE_ARGS inlcude `--with-coverage` and `--cover-package=...` and I can see the coverage report output from the tests). However how I can I have circleCI store this coverage? (the docs say that for django+nose it's all done automatically, but I don't see the XML report)
      • GinFuyou
        cropping part is js setting few inputs values and form then processing those fields on save()
      • camouflage has quit
      • nedbat
        fpghost84: don't you have to ask for an xml report explicitly? (I know nothing about circleCI)
      • ysch joined the channel
      • darkhanb joined the channel
      • fpghost84
        nedbat: possibly
      • I've tried with `--cover-html --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/django/test_result.xml --cover-html-dir=$CIRCLE_TEST_REPORTS/django`
      • but then I get no django dir exists. If I remove that then I get permission denied when writing test_result.xml
      • eising
        hey, is there anything I need to know regarding the "regroup" template tag on a queryset where I try to regroup on a foreign key? I get no errors from Django, but I also get no data...
      • Alphare has quit
      • sarenn
        how would you guys handle this? i have two models: one for devices and one for log entries. log entries will grow a lot of over time and i don't know that it'd be smart to query all log entries that match a foreign key associated with a device. looking at the model reference makes me think i could use the OneToOneField but I might be way off base lol
      • nedbat
        fpghost84: xunit is not the same as the coverage xml report
      • fpghost84
        I'm kind clutching at straws now
      • rpkilby has quit
      • not quite sure which one circleci would like
      • eising
        Here's my code. The regroup returns no data, and I don't really get it... https://www.irccloud.com/pastebin/OeIjALuj/
      • Andr3as joined the channel
      • fikka has quit
      • camouflage joined the channel
      • Uvs joined the channel
      • UncleVasya_ has quit
      • fikka joined the channel
      • stevanr_ has quit
      • jessamynsmith has quit
      • bikeshedder has quit
      • adsworth joined the channel
      • fikka has quit
      • GinFuyou
        How you look at on_delete=PROTECT ? Any usage considerations? I feel kind of strange limiting deletion in the db
      • ssuchingyu joined the channel
      • UncleVasya_ joined the channel
      • Uvs has quit
      • giammi has quit
      • RandomSerb
        GinFuyou: I always use it on, say state->city relations.
      • most likely just because on_delete is required, and DO_NOTHING gives me creeps
      • GinFuyou
        Cities hopefully is unlikely to be deleted (wanted to be deleted rather)
      • ^_^
      • cryptopian has quit
      • czart joined the channel
      • I have structure where related object are highly likely to lose actuality with time, though I find it more reasonable just to mark them inactive and leave in db
      • rpkilby joined the channel
      • so linked object retain all information for archival needs
      • slamtime joined the channel
      • fikka joined the channel
      • fpghost84 has quit
      • stahl has quit
      • fikka has quit
      • webs
        hey GinFuyou i finally solved it :D
      • but ive had to use an expanded form of files
      • like with extends or includes
      • when i use extends i get the error image is not a funciton
      • webs has quit
      • webs joined the channel
      • GinFuyou
        webs, I don't have any idea what are you doing anymore ^_^""
      • Unlimiter joined the channel
      • webs
        GinFuyou: that works https://dpaste.de/HCcP
      • :D
      • fikka joined the channel
      • rpkilby has quit
      • GinFuyou
        and what is the difference to previous?
      • webs
        nothing logical difference really
      • let me show you
      • just see this modified https://dpaste.de/hZSi base.html -> https://dpaste.de/TgHz
      • jessamynsmith joined the channel
      • the first one works https://dpaste.de/HCcP but when i split it into two files ( https://dpaste.de/hZSi + base.html https://dpaste.de/TgHz) it gives $image.cropper is not a function
      • the first one uses no base.html but the second one has that basehtml do you know what to do?
      • telex joined the channel
      • giammi joined the channel