#django

/

      • jaboles has quit
      • jaboles joined the channel
      • rjco has quit
      • __love__
        jshannon: i don't see anything weird. can you pastie the form/model/admin/all of the above?
      • jshannon
        i’m thinking the stack might not be useful because, if there’s a setting of the widget somewhere, it’s not actually part of the stack.
      • jvasallo joined the channel
      • dlogs has quit
      • it’s quite complex. i won’t bother you with it unless i’m still having issues in a while.
      • dlogs joined the channel
      • edbaffei has quit
      • darkcross has quit
      • smotes
        Jayflux: from their docs: "Debug Toolbar is only shown if your IP is listed in the INTERNAL_IPS setting." try adding your machine's IP or just a wildcard * and only enable the toolbar urls if settings.DEBUG = true
      • __love__ didn't set up INTERNAL_IPS either
      • __love__: it sets it to 127.0.0.1 by default, but it may be different for his setup
      • companyhen joined the channel
      • companyhen
        Is this the place to find a Freelance Django Developer to help me with the backend of a project?
      • __love__
        smotes: sure. just detailing what i did/didn't do
      • rjco joined the channel
      • Jayflux
        let me try with a debug project
      • thanks smotes tryed that too
      • didnt work
      • __love__
        companyhen: you can ask (not spam) but you'd probably have better luck on the various job boards around the internet
      • Jayflux
        :/
      • vovanbo joined the channel
      • companyhen
        __love__: Thanks. I've tried HN and gone through two devs who have gotten full time offers.. so I am in need of another and thought I'd try here.
      • smotes
        Jayflux: just to recap, you've installed the app with pip, included it in INSTALLED_APPS, added the debug_toolbar.urls, included the middleware, and explicitly setup your INTERNAL_IPS setting?
      • companyhen
        I'm also trying to learn Django and Python (I'm a frontend dev) so maybe I'll stick around and learn something..
      • __love__
        smotes, Jayflux: if you do all of that work other than adding to INSTALLED_APPS, you need to tell DDT to not patch your settings http://django-debug-toolbar.readthedocs.org/en/...
      • companyhen: Treehouse is going to have a Python/Django course in a few months, if you like learning online
      • companyhen
        __love__: I tried their RoR series, so I may give it a shot ;)
      • Jayflux
        smotes, i haven't included the middleware
      • emorrow joined the channel
      • i haven't told it not to patch either
      • bender314 has quit
      • companyhen
        If anyone is interested in Freelance Django work (reddit/HN clone with additional features) -- the main features are built, they just need optimizations and additions. Please e-mail companyhen@gmail.com ! This is my last message relating to freelance work.
      • Jayflux
        __love__, when you setup a debug project, did you have a dummy page to look at rather than the debug page?
      • guhcampos has quit
      • naro has quit
      • vovanbo has quit
      • pjs joined the channel
      • smotes
        Jayflux: if you try the non-patching route and the explicit setup and neither work, you may just have to conclude it's having issues with the subdomain app or maybe another app
      • __love__
        Jayflux: i didn't do anything other than what i outlined above :) so i just went to / and got an error page because of the url added by DDT
      • smotes
        Jayflux: though i googled conflicts between the two apps and I couldn't fin anything, I tbh I dunno
      • __love__
        Jayflux: but that error page had the DDT on it
      • Jayflux
        im not viewing from the same machine. so it could be internal_ips
      • im viewing from my host machine onto my guest
      • milafrerichs joined the channel
      • __love__
        Jayflux: that could be doing it. add your IP to INTERNAL_IPS?
      • milafrerichs has left the channel
      • Jayflux
        Yup doing it now
      • Pikajew
        using django 1.6 and python3, is there any "hack" around for realizing composite primary keys?
      • smotes
        Jayflux: very possible. like I said earlier, INTERNAL_IPS is set to localhost only by default
      • Jayflux
        need to find what my sub_network ip is
      • smotes
        Jayflux: just do INTERNAL_IPS += ('*',)
      • Jayflux
        can you do an internal_ips '*' ?
      • apollo13
        Pikajew: not that I am aware of
      • Pikajew
        oh snap
      • Jayflux
        oh, done that INTERNAL_IPS = ('*',) still doesn't work
      • :/
      • AntiSpamMeta has quit
      • AntiSpamMeta joined the channel
      • alicefreak joined the channel
      • __love__
        does INTERNAL_IPS support a wildcard
      • ?
      • alicefreak
        Hi, We have stored following html code in database. Django template tags does not work if I render that code. I am trying like this( Template(template_from_db).render(Context({'attribute_list':channel_list}))). https://dpaste.de/ga9F thanks
      • smotes
        Jayflux: try ('*.*.*.*', '0.0.0.0',)
      • Jayflux
        does it even work on the admin page?
      • __love__
        Jayflux: IIRC, no, it doesn't work in the admin
      • Jayflux
        smotes, no difference
      • watermel0n joined the channel
      • INTERNAL_IPS = ('*.*.*.*', '0.0.0.0',)
      • d33tah joined the channel
      • smotes
        Jayflux: what is your subnet class B address?
      • Jayflux: or class C
      • Jayflux
        192.168.1
      • d33tah
        a possibly silly question - why does django's ORM require a primary key in the tables?
      • tbaxter
        alicefreak: you didn't ask, but I *hate* it when html is stored in the db.
      • smotes
        Jayflux: ('192.168.1.0/24', '192.168.1.*',) maybe?
      • d33tah
        i mean, why is it necessary in a query that just reads data?
      • tbaxter
        HTML is for presentation, dbs are for data.
      • Squarepy joined the channel
      • Squarepy has quit
      • jrickman joined the channel
      • Jayflux
        nope smotes i found my IP and added it too, no difference
      • alicefreak
        tbaxter: yeah it sucks
      • tbaxter: is there any better way?
      • smotes
        Jayflux: sorry my friend, I am out of suggestions :(
      • Jayflux
        grr
      • __love__
        d33tah: a PK wouldn't be required to read generic data (give me all records in this table) but they provide a convenient way to pull out specific items and to link items together (the R in RDBMS)
      • hazzadous joined the channel
      • roymiloh joined the channel
      • Jayflux
        Thanks anyway guys, i appreciate it
      • skaflem has quit
      • abe_music has quit
      • I did a debug project __love__ and that didn't have the DDT on it
      • Katharsis
        is it possible to run post_save signal for main model A after all inline models B, C and D (which has fk of A) will be saved?
      • Jayflux
        on the debug error page
      • __love__
        Jayflux: o.O
      • Jayflux
        so maybe its not my project
      • jshannon has quit
      • __love__, are you saying I would see it on the page not found error page?
      • d33tah
        __love__: so, is there a way to read data without a private key? or, if i'm just reading, can i set up a bogus primary key?
      • __love__
        Jayflux: you should
      • d33tah: what are you trying to do/solve by not having PKs?
      • Jayflux
        __love__, thats interesting, fresh new project and i don't see it there either
      • ragsagar_ has quit
      • d33tah
        __love__: the table is huge and there seems to be no point creating a PK, yet i'd like to be able to query it, most preferably using django's ORM
      • SegFaultAX has quit
      • monokrome has quit
      • the data is all static.
      • Jayflux
        oh wait, i added my internal_ips and its there on the right (debug project)
      • SegFaultAX joined the channel
      • ok so its definitelly the subdomains screwing it up then
      • smotes
        Jayflux: good to know you at least figured out why :)
      • tbaxter
        d33tah: if it's a sql DB, there's surely something that's a primary key
      • companyhen has quit
      • mattmcc
        SQL tables don't have to have PKs, no.
      • __love__
        yeah, it's not required to create a table with a pk
      • ForSpareParts has quit
      • Jayflux
        fixed
      • mattmcc
        So, just query it with the regular DB API.
      • Jayflux
        i took DEBUG_TOOLBAR_PATCH_SETTINGS off and its now there
      • tbaxter
        don't HAVE to, but they nearly all seem to
      • Jayflux
        Don't ask....
      • sligodave has quit
      • __love__, smotes ^
      • d33tah
        mattmcc: the only solution then? okay, will do
      • smotes
        Jayflux: haha, woot woot :)
      • __love__
        Jayflux: enoy
      • *enjoy
      • Jayflux
        Thanks so much guys. you've both been helpful :-)
      • + chrisjones
      • smotes
        Jayflux: not a problem my fellow djangonaut
      • ejb has quit
      • m8 has quit
      • __love__
        <3
      • chrisjones
        \o/
      • vovanbo joined the channel
      • __love__
        ascii party
      • tomchristie has quit
      • jshannon joined the channel
      • vovanbo has quit
      • kyheo has quit
      • davidals
        Hi guys, I'm using a Q query with in another queryset. Something like Q(model__in=Model.objects.all()) If model is None I don't want this Q to be evaluated. How can I achieve this?
      • guhcampos joined the channel
      • kyheo joined the channel
      • __love__
        how can Model be None?
      • davidals
        if a FK with blank=true
      • its*
      • digitalfiz has quit