id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 18853 get_template_names() does not consider the queryset-only case Melvyn Sopacua Florian Apolloner "In SingleObjectTemplateResponseMixin candidate names are generated using the model name. This model name is derived either from self.object or self.model but does not consider self.queryset. In the case of ""create forms"", self.object is unset and if self.model is not provided either, an exception is thrown much later by the template loader in select_template. This exception does not point to this method as it successfully returns an (empty) list. The test suite kind of contains a test for this (generic_views/edit.py:test_create_without_redirect), but the problem is that the test posts data to the form and does not actually request the form. In the practical case this form could never have been submitted as it wouldn't be rendered. Patch attached fixes the issue and creates a test." Bug closed Generic views dev Normal duplicate CBV jason@… Accepted 1 0 0 1 1 0