At first I thought it was that there's no handler404, but that doesn't appear to be the case because when I implemented one, it didn't change anything.
Or that it was using a default handler404 which hit one
*hit a template
w0rp joined the channel
Oh wait, it's in handle_uncaught_exception... so I'd need a handler500
knbk
check your 500.html template
moldy
yup
also, i recommend to make your error templates dead stupid
belak
Yeah, it looks like there was an error when trying to handle a 500
moldy
preferably, just static html
belak
Ah, we have other middleware which assumes there will be a logout view
Lobstaman3 joined the channel
Yeah, I think our normal 500 error page is pretty dumb, but I'm taking a number of shortcuts in my tests
drodger_ has quit
so it doesn't surprise me that I broke something
drodger joined the channel
Ryanar joined the channel
Awesome, that was it. Thanks for your help!
jmelloy has quit
KeyJoo joined the channel
Debnet has quit
backnforth has quit
idontneedanick2 has quit
jhfisc joined the channel
jhfisc has quit
jhfisc joined the channel
NomadJim has quit
mcspud
o/
\o
\o/
Sup #django
jhfisc has quit
jhfisc joined the channel
NomadJim joined the channel
Ryanar joined the channel
jhfisc has quit
fellipe joined the channel
jhfisc joined the channel
fellipe
hi, I have a simple modelForm and if I print(form.errors) I can see the validation error messages. However, if I try render this in the template, with {{ form.errors }} or {{ form.non_field_errors }} it shows nothing about errors, just like these variables don't exist. What's wrong?
jhfisc has quit
haidsidj joined the channel
jhfisc joined the channel
jhfisc has quit
jhfisc joined the channel
kurashu89 joined the channel
two_tired joined the channel
jhfisc has quit
jiang42 joined the channel
schinckel
fellipe: Maybe "form" is not in your template context?
Also, I'm not sure why you are doing the recreate of the profile_form after saving: generally you'll want to redirect after a successful POST (otherwise you are likely to have a user accidentally hit REFRESH and submit again)
fellipe
schinckel: yeah, I just said "form" to abbreviate the question here. But as you can see, either the view and template are using profile_form
schinckel
When you re-bind the profile form, that means it's a new instance of the form, without the data (and thus without the errors)
Your view should be much simpler than that.
fellipe
schinckel: you are right about the successfull post. I will change it.
schinckel: oh, I did not think about the rebind form problem.. let me fix it now
Indeed, that's close enough to an UpdateView, that I'd probably just use that (and override the get_object() method)
fellipe
schinckel: right.. I am reading your paste...
schinckel: I want if the request method is GET, the profile is created with just the emailfield prefilled, since it is the username
schinckel
You don't want to "create" something (in the database sense) on a GET, you want to prefill it: if that's the case, then you may want to set the form.initial using that.
behelit has quit
fellipe
schinckel: right. that's it
backnforth joined the channel
mar77i_ has quit
waveclaw joined the channel
mar77i joined the channel
happylappy has quit
jhfisc joined the channel
jhfisc has quit
b00tstr4p has quit
jhfisc joined the channel
jhfisc has quit
schinckel: thanks a lot. solved!
zissou joined the channel
zissou has quit
sud0x3 has quit
jhfisc joined the channel
Troy has quit
jhfisc has quit
jhfisc joined the channel
lod__ has quit
amcorreia joined the channel
Lobstaman3 has quit
dtrudg has quit
Troy joined the channel
jhfisc has quit
jhfisc joined the channel
k_sze[work]
A question for people who use Django with Conda.
fellipe has quit
Under what circumstances would you get symlinks for conda's bin/activate, bin/conda, and bin/deactivate installed directly in your django project directory?
haidsidj has quit
jhfisc has quit
Troy has quit
andyhoang1 has quit
Info-Screen has quit
Info-Screen joined the channel
drodger has quit
drodger joined the channel
govg joined the channel
SecondForm_Glenn has quit
jhfisc joined the channel
andyhoang1 joined the channel
mcspud
Anyone in Australia ever used LinkMarket Services?
jhfisc has quit
iiie has quit
iiie joined the channel
iiie has quit
iiie joined the channel
iiie has quit
iiie joined the channel
iiie has quit
iiie joined the channel
iiie has quit
iiie joined the channel
iiie has quit
jhfisc joined the channel
kupi has quit
amcorreia joined the channel
amcorreia has quit
amcorreia joined the channel
jhfisc has quit
lukebigg has quit
kingarmadillo has quit
jhfisc joined the channel
Mark_2 has quit
haidsidj joined the channel
jhfisc has quit
x4ec7 joined the channel
jhfisc joined the channel
wadadli has quit
jhfisc has quit
lb1c has quit
lb1c joined the channel
veduardo joined the channel
woltman joined the channel
nethop has quit
sartan
hey, so i need to have form fields be hyphenated for field names: so I created form fields using an __init__ constructor, self.fields['field-with-dash-name'] -- the form itself works fine, but I can't reliably use it in a template - can't refer to it like 'form.field-with-dash-name'. Is there a way to just override the rendered field name when I submit a form post?