Related object in CreateWithRelatedMixin should be available to template on GET request

Issue #1 resolved
Branko Vukelic created an issue

The Http404 should be raised at GET stage, and not at POST. At GET stage, we should already be reasonably sure there won't be a 404, and raise a 410 Gone at the POST stage instead.

The object should be available as related_object in the templates after GET request, and the query should be cached so that we don't make another database hit when we need to retrieve the object later at POST stage.

Comments (6)

  1. Branko Vukelic reporter

    Fixed #1: Actually return response object

    Instead of calling render_to_response, simply propagate the response object back to form_valid method so it can return it.

    → <<cset fff724b6ea5b>>

  2. Log in to comment