#django

/

      • tdy_ has quit
      • Y3K
        luminous: Also paste the url you're using please.
      • seagreen has quit
      • txomon joined the channel
      • luminous
      • Y3K: the url pattern?
      • Y3K
        luminous: Yes.
      • tdy_ joined the channel
      • Derailed joined the channel
      • rasca joined the channel
      • endra has quit
      • Derailed
        Yay! Django 1.5!!! ummm, what happened to django.views.generic.simple.direct_to_template?
      • endra joined the channel
      • FunkyBob
        Derailed: it's been deprecated for quite some time now
      • Derailed: use django.shortcuts.render instead
      • luminous
        Y3K: url(r'^new_user/$', new_user_landing_page, name='new_user_landing_page'),
      • Y3K
        luminous: There you go! You aren't accepting any arguments in your urls
      • Derailed
        I never saw notification that it was deprecated, and I can't find it in the backwards-incompatible changes in the 1.5 release notes.
      • FunkyBob
        Derailed: ALL of the old function-based generic views were deprecated when CBVs landed... now, two versions later, they've been yanked
      • Y3K
        FunkyBob: Hello mate :)
      • FunkyBob
        Y3K: !
      • vtone has quit
      • reduxdj joined the channel
      • Caspar^ has quit
      • luminous
        Y3K: that's why i asked about 23:26 < luminous> is it possible to use redirect() without issueing a 30x? eg.. call the view directly, as if it were just another view in the processing chain?
      • FunkyBob
      • reduxdj
        hey question about django 1.4
      • FSCV has quit
      • FunkyBob
        they were deprecated in 1.3
      • reduxdj: mmm?
      • luminous: that's not a redirect
      • josh3336 joined the channel
      • RedXIII
        In django 1.5, if I set AUTH_USER_MODEL, would I still import the model by django.contrib.auth.models.User?
      • FunkyBob
        luminous: you can return the response from another view, if you like...
      • reduxdj
        i am getting server errors, and I have the cookie from my error log
      • Browser has quit
      • luminous
        Y3K: what should the url be? why doesn't redirect just cll the view directly..
      • therick_ has quit
      • Derailed
        FunkyBob, god damnit. that's a whole section of the documentation that I hadn't noticed because I thought the release notes would cover it
      • FunkyBob
        luminous: because redirect is a HTTP REDIRECT
      • reduxdj
        how can I try to find the session, want to see who was trying to buy something and got "undefined" from javascript
      • Derailed
        grr, ARGH
      • FunkyBob
        Derailed: they did.... WHEN IT WAS DEPRECATED
      • home joined the channel
      • Browser joined the channel
      • therick_ joined the channel
      • luminous
        FunkyBob: i understand, but it would seem sensible that there are three types of redirects, 301/302 and then one view to another
      • to me at least
      • Y3K
        luminous: Try r'^new_user/(?<arg>[\w]+)/$'
      • FunkyBob
        luminous: when a view calls another view... that's NOT a redirect
      • luminous
        you do not need to get so worked up
      • FunkyBob
        luminous: well, I need to try _something_ to get the message through
      • luminous
        i get your message
      • and I'm not contending it :)
      • Derailed
        FunkyBob, so this file: https://docs.djangoproject.com/en/1.5/internals... Do I just need to go through that list and make sure we're not using any of it before migrating to 1.5?
      • craigkerstiens has quit
      • luminous
        FunkyBob: thank you for clarifying
      • Y3K: thank you for working through that with me :)
      • FunkyBob
        luminous: well, here's the crux-- when one view returns the result of another view.. do not call it a 'redirect'
      • Y3K
        FunkyBob: How should it be called then?
      • luminous: You're welcome.
      • FunkyBob
        Derailed: probably best to go through all of the release notes for the last couple of versions, to be sure
      • Y3K: 'returning the result of another view'
      • Y3K
        FunkyBob: Hahaha, got it mate. Thanks
      • FunkyBob
        'redirect' has a fairly solidly established meaning in the context of web
      • Y3K
        It's indeed, just wonder if there was some "convennion" about the other thing.
      • nedbat joined the channel
      • craigkerstiens joined the channel
      • FunkyBob
        Y3K: what do you call it when your function returns the result of another function?
      • sometimes we refer to such views as 'wrappers'.... a practice more common with function based generic views
      • reduxdj
        yo funky bob, anyway to pull the session id from a cookie in my log?
      • Y3K
        FunkyBob: Don't know... Everytime I've used nested functions were only with utils / decorators, not "redirecting to another view".
      • Derailed
        Haha actually FunkyBob, I might just be using 'direct_to_template' in just one place -- it just made 75 tests fail :-)
      • Y3K
        I've failed with it but... Is there a way to override the "parent class" model's fields? I know it isn't possible re-declaring the field but maybe in the __init__method? Also, I don't want to override the entire field, just append a validator (at model leve).
      • amigo joined the channel
      • *level
      • josh3336 has quit
      • FunkyBob
        Derailed: heh... well, render() is a near drop-in replacement
      • Zer000 joined the channel
      • lukashed_ joined the channel
      • Zer000
        So I'm upgrading my site to use django 1.5 - if I set DEBUG to False, i get Server Error (500) with no output to the console :( however it works fine when debug is true
      • I'm not even sure how to start looking for the problem.
      • Y3K
        Zer000: Do you have a 404 and 500 templates
      • ??
      • Zer000
        just 404
      • Y3K
        Zer000: Create the another one.
      • mattmcc
        Django 1.5 doesn't require those anymore.
      • Zer000
        man. if its crapping out silently because it was missing 500.html - thats gotta be a bug right?
      • mattmcc
        When DEBUG is False, the place to find error information is your error log.
      • Y3K
        mattmcc: I didn't knew that... Good to know though :P
      • lukashed has quit
      • lukashed_ is now known as lukashed
      • brdma has quit
      • sigpipe has quit
      • brdma joined the channel
      • Zer000: I don't know, when I deployed apps to Heroku if I didn't create the 404 and 500 templates it just crashed :P
      • FunkyBob
        one of these days I'm going to remember who it was in .jp was going to help with with order/invoice system design... :/
      • Zer000
        well, good, because i created a 500 template, and it gives me the same error, but now with my fancy template
      • FunkyBob
        guess I should just corder my friend with a Masters in accounting
      • mattmcc
        Right, in the past it'd look for 404.html when a 404 was raised. Failing to find one, that would cause a TemplateDoesNotExist (an exception, so a 500 response)
      • alexis is now known as alexis`away
      • seagreen joined the channel
      • ldlework has quit
      • Zer000
        mattmcc, but i have a 400 and 500 template now, its giving me 500 but nothing in console.
      • wat do?
      • Y3K
        mattmcc: Check in your settings for if DEFAULT: estatements :)
      • nicklo joined the channel
      • pzuraq has quit
      • rbmk joined the channel
      • pzuraq joined the channel
      • dshap has quit
      • Zer000: Sorry, the last message was for you :P
      • juliaelman has quit
      • hell_razer has quit
      • kanja joined the channel
      • Zer000
        oh
      • Y3K, I don't understand
      • check for waht?
      • kklimonda
        Zer000: if you disable DEBUG then nothing will be printed to the console
      • Y3K
        Zer000: Check if you have "if DEBUG" (sorry) statements in your project, maybe one of those is breaking it.
      • Zer000
        Y3K, I don't for a fact
      • kklimonda, well how can I debug then?
      • sounds silly, but like I said there are no problems when debug is on
      • kklimonda
        Zer000: change the logging behaviour in settings
      • Zer000
        ah ok
      • keimlink has quit
      • pzuraq
        for many to many mappings, can there be meta data associated with the keys in the table?
      • Willhxr has quit
      • Y3K
        pzuraq: Hmm... Maybe the through option can help you.
      • sebleblanc has quit
      • pzuraq
        I want to have a "relationship type" for each mapping
      • hmm, through
      • happyface has quit
      • savid has quit
      • vtone joined the channel
      • Zer000
        Could it be this "DeprecationWarning: django.conf.urls.defaults is deprecated"?
      • Y3K
        Zer000: AFAIK a deprecation warning shouldn't take down a non-DEBUG site :P
      • mgrouchy has quit
      • davlaps joined the channel
      • davlaps has quit
      • davlaps joined the channel
      • kanja has quit
      • KrauserIII joined the channel
      • jMyles joined the channel
      • racycle joined the channel
      • zacharypch has quit
      • ionelmc has quit
      • offbyone joined the channel
      • pzuraq
        Y3K: perfect, exactly what I need, thanks :)
      • brunocedraz has quit