#django

/

      • julieswoope
        ah sorry should have included
      • updating
      • selimeki joined the channel
      • FSCV has quit
      • stephenmcd joined the channel
      • selimeki is now known as selim
      • selim is now known as selimeki
      • JJMalina joined the channel
      • tomsthumb has quit
      • arunkumar413 has quit
      • Escherial has left the channel
      • fabiobatalha has quit
      • Nervosa
        Need to figure out why the url isn't being formed correctly... unfortunately I don't know enough in that area to help.
      • fabiobatalha joined the channel
      • selimeki has quit
      • Kiryx joined the channel
      • vidirr_ has quit
      • julieswoope
        hm ok thanks though
      • arunkumar413 joined the channel
      • arunkumar413
        hi, I'm getting error when i run syncdb command http://pastebin.com/injKxQCC . please help
      • Nervosa
        Try putting the class above Tweet
      • hansy has quit
      • iambernie
        arunkumar413: put " " around Tags i
      • arunkumar413: by that I mean ForeignKey("Tags")
      • sebleblanc joined the channel
      • arunkumar413
        arunkumar413, but Tags is Class name. can we put a class name in " "
      • nedbat_ is now known as nedbat
      • mattmcc
        You can when referencing models in ForeignKey, ManyToManyField, and OneToOneField because it'll lazily look up the class in the model class cache that Django maintains.
      • iambernie
        arunkumar413: It is a class name indeed, but I think it's necessary for django to parse it.
      • dlam
        ok i have a user using the admin ui, who is getting a 403 forbidden error when trying to add a django-cms plugin (it does a POST), anyone know what to check?
      • iambernie
        arunkumar413: I've run into that as well, it helped for me at least.
      • dlam
        i tried clearing his cookies
      • arunkumar413
        iambernie, ok
      • arunkumar413 has quit
      • arunkumar413 joined the channel
      • iambernie, how to set the foreign key to be a class element rather than class
      • arunkumar413 has quit
      • arunkumar413 joined the channel
      • iambernie, how to set the foreign key to be a class element rather than class
      • jellosea has left the channel
      • mattmcc
        arunkumar413: Are you trying to point your FK at a specific field, other than the default (which is the id)?
      • If so, there's a to_field argument for that. https://docs.djangoproject.com/en/1.4/ref/model...
      • sebleblanc has quit
      • arunkumar413
        iambernie, mattdawson , getting this error: http://pastebin.com/ZvU2z6TP
      • iambernie
        mattmcc: When would this be useful? Why not simply point it to the id of class somemodel, and use somemodel.attribute ?
      • __love__ has quit
      • nkuttler
        arunkumar413: the error tells you what to do
      • mattmcc
        iambernie: It isn't, really, unless you're dealing with a legacy DB schema that sucks.
      • JJMalina has quit
      • iambernie
        arunkumar413: search for "foreign key related name" in the docs
      • mattmcc
        arunkumar413: Do what the error tells you.
      • PiotrSikora has quit
      • arunkumar413
        mattdawson, iambernie , i'm new to django, can you please suggest changes i should make
      • nkuttler
        arunkumar413: Add a related_name argument to the definition for 'tag_company'
      • iambernie
        arunkumar413: and besides doing what the errors tells you to do, I would also suggest thinking about why it's necessary. Suppose you want to find out taguser for a given tag?
      • chrisjones has quit
      • EyePulp has quit
      • PiotrSikora joined the channel
      • anth0ny has quit
      • arunkumar413
        iambernie, but there is no field by tag_user in my code
      • nkuttler
        arunkumar413: you have two foreign keys to Tags. django can't reverse them because they would both have the same name. you need to add a related_name (for the third time)
      • FunkyBob
        arunkumar413: django automatically adds the reverse relation to your models
      • mattmcc
        FunkyBob: So the MySQL guy got banned. ;)
      • sorensen joined the channel
      • bitmonk_ joined the channel
      • FunkyBob
        mattmcc: haha
      • elkuka has left the channel
      • they finally got sick of him using "By MySQL does it" as justification for "features"?
      • s/By/but/
      • arunkumar413 has quit
      • mattmcc
        And prefacing every question with stuff like "It's amazing so many people use this crap when it's missing this basic thing"
      • FunkyBob
        haha
      • neataroni
        I thought I remembered reading something in the docs showing how to see all the request.META and other stuff that is sent, how do i do that?
      • FunkyBob
        "It's amazing you consider yourself in a position to criticise, when you fail to grasp the fundamentals of the relational model."
      • thomasbartelmess joined the channel
      • shapiromatron joined the channel
      • methoddk joined the channel
      • chrislkeller joined the channel
      • bitmonk has quit
      • bitmonk_ is now known as bitmonk
      • mattmcc
        Oh, yeah, like today one of his gripes was that DB files in /var/lib/postgres weren't named by the table names "like MySQL does it"
      • justinzane has quit
      • FunkyBob
        haha
      • neataroni
        let me rephrase- when i send a json response to a request, how can i see everything that is sent, besides just the json in response.content
      • mattmcc
        Firebug? :P
      • darthlukan has quit
      • czpython has quit
      • neataroni
        mattmcc: oh thats true
      • akcx has quit
      • mattmcc: except i would need to make a frontend to send post requests in that case...
      • mattmcc
        curl -d
      • akcx joined the channel
      • Er, nevermind.
      • stuntmachine joined the channel
      • dgovinda joined the channel
      • gg7 has quit
      • Actually, if you just want to see response headers, that's fine.
      • bitmonk_ joined the channel
      • bitmonk has quit
      • bitmonk_ is now known as bitmonk
      • darthlukan joined the channel
      • bitmonk_ joined the channel
      • arunkumar413 joined the channel
      • arunkumar413
        iambernie, mattmcc what should i put in the braces to refer to the object of Tag Class taguser = models.ForeignKey("Tags")
      • bitmonk has quit
      • darthlukan has quit
      • thomasbartelmess has quit
      • iambernie
        arunkumar413: dunno, maybe just a descriptive name for the taguser attribute? e.g. taguser = models.ForeignKey("Tags", related_name="taguser")
      • bitmonk_ has quit
      • julieswoope has quit
      • shurain has quit
      • thomasbartelmess joined the channel
      • lyrae
        When following the tutorial, going to localhost/polls/ gives me a 404. what could cause this?
      • pretty sure my ROOT_URLCONF is pointing right
      • FunkyBob
        having no poll objects
      • shapiromatron has left the channel
      • lyrae
        you mean views?
      • FunkyBob
        lyrae: read the error page carefully
      • no, I mean objects
      • arunkumar413
        iambernie, i want the taguser to refer to the object of Tags Class
      • berto- joined the channel
      • jammons joined the channel
      • lyrae
        oh. i had to restart the server
      • do i need to restart it whenevering adding a url pattern rule?
      • mercutio22
        omg I just flushed the database and can't syncdb anymore because of some problem with my user profile class: http://paste.pound-python.org/show/24487/
      • any clues?
      • cincinnatus joined the channel
      • cincinnatus
        Does anyone here use client-side templating?
      • (with JavaScript, that is)
      • FunkyBob
        yes
      • lyrae: are you nor using runserver?
      • cincinnatus
        FunkyBob: which library?
      • justinzane joined the channel
      • iambernie
        mercutio22: Can you dpaste your models?
      • FunkyBob
        cincinnatus: json-templates and handlebars... oh, and the one built into backbone
      • tansaku has quit
      • mercutio22: do you have some signal that fires off user creation?
      • hamms has quit
      • mercutio22: and are you using South ?
      • thomasbartelmess has quit
      • mercutio22
        FunkyBob: I will
      • FunkyBob: its already in installed_apps
      • should I run migrate instead?
      • deitarion has left the channel
      • lyrae
        FunkyBob: I am
      • FunkyBob
        lyrae: then it will normally reload itself on code changes
      • mercutio22
        no.. does not do it
      • FunkyBob
        mercutio22: no
      • lyrae
        well then something went wrong, because I had to stop and restart it