#django

/

      • agemaniac joined the channel
      • harmaahylje
        jtiai: thanks
      • jtiai
        harmaahylje: so there is new column, no new table, just (bizarre) foreign key.
      • Zeo joined the channel
      • harmaahylje: Which is really should normalize as soon as possible.
      • s/is/you/
      • dirigeant joined the channel
      • goopen joined the channel
      • Zeograd has quit
      • harmaahylje
        probably the next thing to do when I get it running on the server
      • rosco77 joined the channel
      • mattmcc
        It'll be interesting to see what migrations wants to do with that change.
      • telex joined the channel
      • adrian_lc joined the channel
      • scarabx joined the channel
      • njrm34 has quit
      • scarabx has quit
      • harmaahylje
        What I don't get is why did the previous implementation (inside try-except) work in sqlite, but not mysql
      • jtiai
        harmaahylje: By accident.
      • harmaahylje: To comfort you - it's not first that kind of completely broken attempt to make dynamic choices-list from db.
      • Satchitananda has quit
      • mattmcc
        Yeah, it comes up every now & then.
      • njrm34 joined the channel
      • shawnadelic has quit
      • rosco77 has quit
      • harmaahylje
        jtiai: what if I created the lists from a text file? =)
      • akaariai joined the channel
      • ksoviero joined the channel
      • Zeo has quit
      • crakrjak joined the channel
      • Zeo joined the channel
      • greg_f joined the channel
      • ksoviero
        I'm looking for a free/libre image of an iMac (or similar) for displaying a screenshot on, on my home page. Any good suggestions? I tried PSDCovers, but I they're some actionscript thing that I can't open with anything but photoshop, and since I'm primarily a backend dev, I don't have the CS suite.
      • davea joined the channel
      • jtiai
        harmaahylje: Well you can do that as normal Django choices then.
      • harmaahylje: Catch is that change of choices requires code restart to be effective.
      • harmaahylje
        jtiai: this implementation has the same catch
      • I mean, the one I had
      • jtiai
        harmaahylje: Except it doesn't work with db.
      • harmaahylje
        I know the previous dev made a script to reload the app because of this
      • jtiai
        harmaahylje: Even more terrifying.
      • harmaahylje: Which would have been avoided by simple foreign key.
      • mattmcc
        It's amazing how hard some people work to make their own lives difficult.
      • harmaahylje
        mattmcc: the guy works like 2 hours a week on the app, and he has to implement new features mostly
      • brat197 joined the channel
      • so I understand why he chose to do this quickly
      • jtiai
        harmaahylje: That is definitely not quick way to do that.
      • harmaahylje
        well, not everyone always have the perfect solutions available, otherwise we would not be needed right
      • jtiai
        since in production that change would require restarting app servers (which may require priviledges)
      • harmaahylje
        haven't seen perfect implementations anyuwhere
      • Zeo has quit
      • jtiai: it is in production
      • Zeograd joined the channel
      • jtiai
        harmaahylje: that is really scary.
      • d3vnull joined the channel
      • realnot joined the channel
      • harmaahylje
        jtiai: why is is 'scary'?
      • is it*
      • yomilk has quit
      • jtiai
        well if you think that someone chages one value in that "handeness" group in your fieldchoices models.
      • harmaahylje
        jtiai: well yeah it can fuck up all the data
      • jtiai
        you just perfectly did valid thing corrupted your data.
      • harmaahylje
        but I guess the access is very limited and they won't do such things
      • I have been talking about this kind of things over here but no one is concerned at all
      • jtiai
        Well in the long run people will do.
      • harmaahylje
        that is my opinion aswell
      • gkap joined the channel
      • but can't do really much because they want everything be "open for change"
      • coz they can't decide what they want
      • </rant>
      • Dominee joined the channel
      • crakrjak joined the channel
      • njrm34 has quit
      • tomchristie joined the channel
      • Satchitananda joined the channel
      • Saturn812 joined the channel
      • Contigi has quit
      • AndyRez joined the channel
      • wengole has quit
      • keimlink joined the channel
      • gkaplan joined the channel
      • cZk joined the channel
      • gkap has quit
      • Boogymanx joined the channel
      • gkap joined the channel
      • timkofu joined the channel
      • timkofu
        hi
      • pilva joined the channel
      • gkaplan has quit
      • gkaplan joined the channel
      • jladage has quit
      • veb joined the channel
      • d3vnull has quit
      • gkap has quit
      • Boogymanx
        Hey guys, I have a model Applicant that has a OneToOne to a custom user model which has a first and last name. On this Applicant model, I'm trying to return the user's full name as __unicode__(self).
      • the_rat_ joined the channel
      • Hanumaan
        can anyone suggest what is the problem here: http://132.230.56.145/
      • Boogymanx
        I'm doing it like this: https://dpaste.de/K53z but in admin I still just see "Applicant object"
      • Hanumaan
        css does not load what should be the way of solution
      • Ergo^ joined the channel
      • Boogymanx
        Hanumaan: if I go to /static/img/ (which also gives a 404) the folder is empty
      • same with /css/
      • jladage joined the channel
      • gkap joined the channel
      • Hanumaan
        Boogymanx, should I copy those things? or there should be a better method right? what am I doing wrong? please let me know if you need any information. .. it works fine on my local version ..
      • Boogymanx
        Well, you should make sure those files are in the folder served by Apache
      • gkaplan has quit
      • d3vnull joined the channel
      • mattmcc
        Hanumaan: What does manage.py findstatic css/style.css tell you?
      • Hanumaan
        mattmcc, it says no matching file found for 'css/style.css'
      • mattmcc
        Where is that file located?
      • Wherever it is, the staticfiles app isn't looking for it there.
      • prohobo joined the channel
      • tomchristie joined the channel
      • SteenJobs joined the channel
      • Hanumaan
        mattmcc, it is static/css/style.css here .. how do I make staticfiles app to look at there? And I think keeping in static folder is not great idea right?
      • mitaka joined the channel
      • mattmcc, they should get generated by themselves with collect command?
      • Boogymanx
        if you do findstatic static/css/style.css, does it find it then? I'm assuming findstatic would check in the static folder by default
      • I think that's only for apps not in your project, not sure
      • or well, third-party apps
      • mattmcc
        Boogymanx: That's not the right path.
      • The argument to findstatic should be everything after STATIC_URL.
      • silentninja95 joined the channel
      • Hanumaan
        Boogymanx, it says no such file that file exists in my development machine not in server ..
      • Boogymanx
        mattmcc: I wasn't sure
      • mattmcc
        Haudegen: What's the parent directory of that static dir that has css/style.css in it? Is it your project or an app?
      • Boogymanx
        Couldn't you just sftp the files in the correct folder?
      • mattmcc
        No, collectstatic is the way to do this.
      • It's kind of important that it works right.
      • Hanumaan
        mattmcc, its my project ..
      • mattmcc
        Haudegen: Alright. What's the value of STATICFILES_DIRS?
      • And STATIC_ROOT?
      • Hanumaan
        mattmcc, what do you mean by value? did not understood
      • mattmcc
        They're both settings.
      • Nizumzen has quit
      • mitaka has quit
      • Lauxley joined the channel
      • In order to have static files in your project, that static directory (project_dir/static) needs to be listed in STATICFILES_DIRS.
      • Hanumaan
      • ojii joined the channel
      • romgar joined the channel
      • wicope joined the channel
      • Nizumzen joined the channel
      • mattmcc
        So you've got an empty STATICFILES_DIRS. The commented out is probably almost right, although BASE_DIR by default points to the parent directory of your project.
      • What's SITE_ROOT?
      • Hanumaan
        mattmcc, SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
      • mattmcc
        So it's your project directory.
      • gkaplan joined the channel
      • Hanumaan
        mattmcc, ys