On Sun, 2009-01-11 at 19:27 -0800, stryderjzw wrote: > Hi, > > Here's part of my code: > > class NewAssignmentFormPreview(FormPreview): > > def done(self, request, form): > assignment = form.save(commit=False) > assignment.save() > > ... > > return HttpResponseRedirect(assignment.get_absolute_url()) > > > I do an HttpResponseRedirect to go to the assignment page after it's > been created. > > However, when I do a refresh on that page, it still asks me if I want > to submit POST data and an additional assignment is created. I thought > HttpResponseRedirect is suppose to prevent that.
Then either your browser is broken or you're not really hitting that line of code. You could verify the latter case by inserting a syntax error in the line (e.g. misspell "get_absolute_url") and make sure the line is executed. Also, check this using the development server (or by looking at your web server logs) and check that a request really is being sent to the server from the browser after the redirect response is sent back. Regards, Malcolm > > Any ideas? > > Thanks! > Justin > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---