#django

/

      • riverfr0zen
        authors even
      • deitarion
        Actually, stories to fandoms in that case.
      • The point is that both Story.authors and Story.fandoms are ManyToManyFields, so the regular regroup tag can't group by them.
      • Sevrius has quit
      • That particular example regroup tag is what I want to do on per-author pages. (I want to list all the author's stories, grouped by fandom)
      • bahamas joined the channel
      • elkuka joined the channel
      • elkuka
        sorry I have the following error with south and can't fix it, how should I? south.exceptions.NoMigrations: Application '<module 'google_analytics' from 'environment/google_analytics/__init__.pyc'>' has no migrations.
      • ptone_mobile is now known as ptone
      • gcbirzan
        elkuka: What did you try to do
      • XofP joined the channel
      • md4d joined the channel
      • chrisjones has quit
      • Sonderblade joined the channel
      • mohi666 has quit
      • md4d has quit
      • elkuka
        I've installed the wrong "google analytics" app, run syncdb, then I realized my error (they are called almost the same) - pip uninstall wrongapp - pip install correct app - /debugger gave me error in tables - so I ran again syncdb and just in case manage.py migrate
      • (I may have used migrate with wrong app also)
      • glosoli has quit
      • gcbirzan: what do you think? thanks btw
      • crobison has quit
      • glosoli joined the channel
      • glosoli has quit
      • jpadilla joined the channel
      • iiie
        elkuka: are there tables with either google analytics app? are they under south? (is there data in the database that you care about for the app?)
      • riverfr0zen
        @deitarion: but may not authors transgress fandoms?
      • glosoli joined the channel
      • JustSighDudes has quit
      • so you'll see all these stories repeated again and again
      • jpadilla
        When USE_TZ = True everytime Django sets the last login for the user I get a RuntimeWarning: DateTimeField received a naive datetime. anyway to fix this?
      • cyberdelia joined the channel
      • neataroni has quit
      • gcbirzan
      • elkuka: You might need to, hm. Something with ./manage.py migrate --delete-ghost-migrations ?
      • deitarion
        riverfr0zen: I consider that acceptable. Better than something like letting the DB engine pseudo-randomly bless one fandom as "first" to be chosen for the fic to sit in.
      • iiie
        elkuka: if there are tables, but you don't care about any data in them manage.py reset appname; if the data is important I'd back it up (with database commands not django -- as you might not be in a "sane" state)
      • elkuka
        oh! I also did that! sorry
      • deitarion
        riverfr0zen: ...either that or I could have it treat each combination of fandoms as a category.
      • elkuka
        gcbirzan: I also did that I forgot it
      • iiie
        elkuka: with south, I tend to use --fake to run between migrations I don't believe happened
      • neataroni joined the channel
      • neataroni
        for the logs- I was using django.contrib.auth.login as my view, i SHOULD have been using django.contri.auth.views.login...
      • gcbirzan
        elkuka: Post the whole traceback, please
      • Partysun joined the channel
      • jpadilla
        gcbirzan: already read that, I would think that Django's user model datetimefields are tz aware, right?
      • lucian has quit
      • cheater_ joined the channel
      • elkuka
      • riverfr0zen
        @deitarion can fandoms be about an author, or also about stories?
      • bmispelon has quit
      • deitarion
        riverfr0zen: A fandom would be something like "Harry Potter" or "Naruto" or "Twilight".
      • gcbirzan
        elkuka: Is the 'correct' application called the same as the old one?
      • elkuka
        yes
      • linuxperv has left the channel
      • gcbirzan
        elkuka: and what command did you run?
      • elkuka
        to install? pip git+git:github....
      • deitarion
        riverfr0zen: I'm trying to migrate this over to something database-backed. Fandoms are the things in brackets after the author names. --> http://vffa.ficfan.org/
      • elkuka
        or now? I just ran manage.py migrate
      • cheater__ has quit
      • riverfr0zen
        @deitarion can you dpaste the models you have?
      • elkuka
        gcbirzan: I just ran manage.py migrate, to install? pip git+git:github...
      • deitarion
        riverfr0zen: One sec.
      • QuanSai has quit
      • gcbirzan
        elkuka: Hm. And you said you did migrate --delete-ghost-migrations? what did it say
      • andrewjsledge joined the channel
      • deitarion
      • lucian joined the channel
      • aezell joined the channel
      • tommygu joined the channel
      • Partysun has quit
      • ldlework has quit
      • hubx joined the channel
      • elkuka
        gcbirzan: http://dpaste.com/778862/ this happened right after installing correct one
      • doughj3 has quit
      • gcbirzan
        elkuka: What about what I asked, about --delete-ghost-migrations?
      • andrewjsledge has quit
      • ldlework joined the channel
      • doughj3 joined the channel
      • FaKiE joined the channel
      • chrisjones joined the channel
      • elkuka
        gcbirzan: I couldn't find it on history... I think it went all ok, it didn't give any error, thanks a lot have to go now, will try later.... maybe with new env I guess
      • deitarion has left the channel
      • deitarion joined the channel
      • zacharypch has quit
      • lacrymology joined the channel
      • deitarion
        The big problem with multi-monitor setups. You're more likely to send a key combo like Ctrl+W to the wrong window. ...wait... that's just a problem with IRC clients making it too easy to /part
      • byomkeshbakshi joined the channel
      • kroosec joined the channel
      • byomkeshbakshi
        whats the difference between these 2 url definitions /display/$ and /display$?
      • riverfr0zen
        @deitarion phew. have you tried to write the actual sql that would require that?
      • lacrymology
        does ImageField handle PDF files?
      • kroosec
        Hi, how to translate DateField to another language ? It is ouput in English (July 31...), although I changed LANGUAGE_COD
      • deitarion
        riverfr0zen: Rephrase?
      • jdo_dk
        lacrymology: Is PDF an Image ?
      • lacrymology
        jdo_dk: sometimes
      • riverfr0zen
        @lacrymology try filefield
      • FileField
      • jdo_dk
        Lacrymology: No, pdf is just a plain file, that can contain text, images etc.. But not an image as ImageField would expect, Use FileField as riverfr0zen says.
      • deitarion
        riverfr0zen: How would SQL require anything that could be described as "that" in this situation? Did you mean "Have you tried writing the raw SQL which would perform the query you want?"
      • jdo_dk
      • G1eb has quit
      • riverfr0zen
        @deitarion are you fairly competent at SQL?
      • lacrymology
        yeah, I know filefield
      • I was just wondering, maybe it did handle PDFs it'd be nice, but no problem
      • deitarion
        riverfr0zen: Yeah. I have a decent number of personal projects which use the raw Python stdlib sqlite3 bindings for their data storage.
      • sor_app joined the channel
      • jdo_dk
        lacry: I wont
      • it*
      • charettes joined the channel
      • deitarion
        riverfr0zen: ...and I insist on knowing enough SQL to feel comfortable manipulating my data by hand in /usr/bin/sqlite3.
      • rogi has quit
      • Filuren is now known as Stalkr_
      • neataroni has quit
      • riverfr0zen
        @deitarion Just saying, sometimes it can be helpful to first imitate what the SQL you are trying to generate through the orm will look like, before contemplating the orm
      • deitarion
        riverfr0zen: This has nothing to do with SQL. I'm trying to figure out how to work around the fact that Django Templates are primitive and bass-ackwards compared to Jinja2 but the Jinja2 adaptor doesn't integrate well enough for my tastes.
      • riverfr0zen
        hmm. okay. maybe my brain is a little baked. i'm going to stop now.
      • gremly joined the channel
      • danfairs has quit
      • kroosec
        the localize template tag is not working for DateField values ? any reason for that ?
      • deitarion
        I have no problem doing this in Python and/or SQL... but I really don't feel like writing a slowly-growing set of methods on my models which are essentially custom database views.
      • lacrymology
        how do I define upload_to with a model's method? as a string? or do I need to use a classmethod?
      • deitarion
        Much better to just figure out why the heck Django's magic object.attribute.0.dictKey.method resolution doesn't seem to be working the way the docs say it should and then write a custom variant of {% regroup %} which supports ManyToManyField.
      • lyrae
        han solo
      • bitmonk has quit
      • jpadilla
        has anyone succesfully used stunnel before?
      • bitmonk joined the channel
      • or any other alternative to test https locally?
      • byomkeshbakshi has quit
      • rafael has quit
      • wenzhixue joined the channel
      • hoot has quit
      • olarva has quit
      • wfq has quit
      • chuckharmston joined the channel
      • daniel___ has quit
      • mDemocritus
        jpadilla: you could do some proxying with apache or nginx
      • hubx has quit
      • zacharypch joined the channel
      • easypi joined the channel
      • easypi
        in django 1.4, 'templates' folders suppose to be within their app folder or placed in the main project folder as in project/project/templates/<appname> ?
      • fission6
        can i change the responde code to 500 in render_to_response
      • chuckharmston has quit
      • xaroth
        easypi: it's common to put app templates in the app's folder
      • devsundar joined the channel
      • rogi joined the channel
      • jvdz has quit
      • seanbrant
        fission6: it should take a status kwarg
      • devsundar
        My Homework1 works fine in my local machine, but when i upload it fails
      • any idea or similar experience
      • reuf joined the channel