Ah does this way seem sensible?
> Nis Jørgensen wrote:
>>The argument to HttpResponseRedirect is a url. You seem to be confusing
>>it with a template.
code ....
# some error occurs
return HttpResponseRedirect('error/2/')
def error(request, message):
{
error_messages = {
'1': 'You dont have access.' ,
'2': 'Server error ...'
}
return render_to_response('error_page.html', {'message':message})
}
That way the user gets a nice clean URL and I can send a specific message into
the
template.
Is there some commonly accepted practice here in Django?
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---