#django

/

      • microdex joined the channel
      • cZk joined the channel
      • toothe
        anyone familiar with django.core.files.storage?
      • mattmcc
        toothe: Just ask the question
      • space-wizard joined the channel
      • rain0r has quit
      • AgUnMu joined the channel
      • erik` joined the channel
      • offs3tzer0 joined the channel
      • harmaahylje joined the channel
      • quenode joined the channel
      • whaack joined the channel
      • Brando753 joined the channel
      • ldlework joined the channel
      • feathered_person joined the channel
      • ciurkut has quit
      • asbjxrn joined the channel
      • SmileyChris joined the channel
      • Dslegends joined the channel
      • whaack has quit
      • SpoutBE joined the channel
      • SpoutBE has quit
      • chowmeined joined the channel
      • AntiSpamMeta has quit
      • AntiSpamMeta joined the channel
      • SpoutBE joined the channel
      • realnot has quit
      • Spa_Ins has quit
      • chowmeined has quit
      • realnot joined the channel
      • dardevelin joined the channel
      • ASonOfGod joined the channel
      • atlasloewenherz has quit
      • atlasloewenherz joined the channel
      • kodeart joined the channel
      • Guest84636 joined the channel
      • dheerajchand has quit
      • shosca has quit
      • feathered_person has quit
      • atlasloewenherz has quit
      • GJdan joined the channel
      • asbjxrn joined the channel
      • DevBox has quit
      • mandeep joined the channel
      • dheerajchand joined the channel
      • EvilDMP- joined the channel
      • casf joined the channel
      • coulix_tap joined the channel
      • coulix_tap
        I am migrating a 1.5 project to 1.6 (then 1.9). imports used `import myapp` and settings had `myapp` in requirements. For 1.6 the project name needed to be appened. `myproject.myapp`. Can PYTHONPATH be set the app like in 1.5 or is that a bad pratice. (relative imports)
      • kodeart is now known as Guest39055
      • andygmb joined the channel
      • dkb20k joined the channel
      • apollo13
        coulix_tap: the project name was never needed
      • coulix_tap
        The djangoproject startproject does use the projectname in the default settings and urs. Is that optional?
      • dopry__ joined the channel
      • apollo13
        project name is a "relative" term, all django needs is an importable path
      • coulix_tap
      • apollo13
        that should not be done or needed!
      • andygmb has quit
      • myapp is usually on the same level as myproject, not below
      • coulix_tap
        I remeber this move too, maybe not in 1.6 though.
      • apollo13
        there was never ever a need for the project name before the appname
      • dkb20k has quit
      • there have been some double import issues, but that was 1.4 or so
      • dopry_ has quit
      • hutch34 has quit
      • DLSteve joined the channel
      • coulix_tap
        Alright I moved back manage.py to the project folder. That did the trick.
      • microdex joined the channel
      • asbjxrn joined the channel
      • Azrathud joined the channel
      • pembo13 joined the channel
      • hutch34 joined the channel
      • SmileyChris has quit
      • feathered_person joined the channel
      • restless_being has quit
      • microdex has quit
      • Greener joined the channel
      • dheerajchand has quit
      • feathered_person has quit
      • toothe
        is there an IPv4/v6 validation?
      • validating function?
      • I'm looking to validate that, say, a certain CIDR block is valid.
      • bibek22 joined the channel
      • pembo13 has quit
      • frostythesnowman joined the channel
      • pembo13 joined the channel
      • mattmcc
        toothe: Haven't used it, but https://python-iptools.readthedocs.org/en/latest/ looks applicable.
      • toothe
        awesome!
      • Synthead joined the channel
      • chowmeined joined the channel
      • trey joined the channel
      • dheerajchand joined the channel
      • tuxtoti has quit
      • hutch34 has quit
      • phorloop joined the channel
      • intr1nsic has quit
      • deitarion
        What's the simplest way to form a queryset for `foreign_key = # OR foreign_key IS NULL`?
      • frostythesnowman
        hi, i'm seeing a really weird phenomenon in my django app where a page load to /user/123 is also firing a request to /user in the background. does anyone know waht could be causing this?
      • intr1nsic joined the channel
      • BodaciousBrian joined the channel
      • deitarion
        Wait, sorry. Conflating two problems. What I meant to ask is how do I do that for a many-to-many relation.
      • BodaciousBrian
        can anyone help me get anything out of my django server that isnt a 500 error?
      • frostythesnowman
        i've even tried purposely causing a traceback in the handler for /user. then, when i navigate to /user/123 (which is handled by a different handler), the page loads fine, but in my server logs i see a request going to /user immediately afterwards that triggers the traceback
      • Sammichmaker joined the channel
      • BodaciousBrian
        i have posted my views and url/py here http://pastebin.com/5gc930kC urls seems to call views just fine, and views is being called, but the Index function in views is not responding at all
      • SlayerGoury has quit
      • mattmcc
        frostythesnowman: Browser prefetching?
      • frostythesnowman: Does the same thing happen if you use curl, for example?
      • hutch34 joined the channel
      • deitarion
        Actually, does Django's ORM have a way to enforce an equivalent to null=False on ManyToManyField?
      • phorloop_ joined the channel
      • mattmcc
        BodaciousBrian: Looks fine, assuming the URL you're viewing is the root, e.g http://localhost:8000/
      • How are you running Django?
      • BodaciousBrian
        Yes it is... Im running it via the manage.py runserver command
      • phorloop_ has quit
      • tuxtoti joined the channel
      • "[27/Feb/2016 17:32:12] "GET /test HTTP/1.1" 500 27" is all i get out of it
      • mattmcc
        deitarion: There isn't an equivalent in SQL, so no. But validation for a form will trigger, that is if you have a ManyToManyField that isn't blank=True, a form won't validate if you don't pick an option.
      • BodaciousBrian
        it seems nothing i change can get a different result
      • hpanago has quit
      • mattmcc
        '/test' wouldn't call index.
      • Only '/'
      • phorloop has quit
      • BodaciousBrian
        Oh sorry, i know.. i have just implemented a New test view. but the / is the same result
      • always error 500 27
      • mattmcc
        So, you are getting a 500 there, what's the traceback?
      • BodaciousBrian
        im not sure how to get a traceback
      • mattmcc
        If DEBUG is True, it'll show up in your browser.
      • BodaciousBrian
        DEBUG = os.environ.get('DEBUG') == 'True'
      • on the website itself all i get is "Server Error (500)"
      • mattmcc
        So you need to set that environment variable.
      • maryokhin has quit
      • BodaciousBrian
        haha, got it....
      • i thought that was setting it =) i have the traceback now
      • well, i might be able to solve this now that the debug is fixed
      • dheerajchand has quit
      • mattmcc
        return render(request, "index.html", {'working'})
      • vyscond joined the channel
      • jaddison has quit
      • BodaciousBrian
        ive tried that line about every way a view is returned that can be found online... In my templates directry i have an index.html that just says 'working' in the files
      • mattmcc
        Well, {'working'} isn't a dictionary, it's a set.
      • BodaciousBrian
        yes i just want anything to be returned..... that isnt a 500 anyway
      • dkb20k joined the channel
      • mattmcc
        So make that a dictionary.
      • Since that's what's expected for the context argument to render..
      • And, maybe, run through the official tutorial again, or if you haven't yet.
      • ubuntu_aze has quit