#20186: Overriding registration/logged_out.html template doesn't work -------------------------------------+------------------------------------- Reporter: honyczek | Owner: nobody Type: Bug | Status: closed Component: contrib.auth | Version: 1.5 Severity: Normal | Resolution: invalid Keywords: templates, auth, | Triage Stage: login, logout | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 1 -------------------------------------+------------------------------------- Changes (by bmispelon):
* status: new => closed * resolution: => invalid Comment: Thanks herve for taking the time to write a test project. I think there is a misunderstanding here, not a bug. Let me try and explain. The `login` and `logout` views from `dango.contrib.auth` use `registration/login.html` and `registration/logged_out.html` respectively. In addition to that, `django.contrib.admin` provides a `registration/logged_out.html`, but no `registration/login.html` (it uses its own `admin/login.html`). If `django.contrib.admin` appears before your own app in `settings.INSTALLED_APPS`, then the logout view will use the admin's template instead of your app's. This has not changed recently, as you can check by running herve's test project under different versions of django. As for the tutorial being incorrect, I disagree. If you read the link given by honyczek in his/her comment, you'll see that it recommends putting the templates inside a directory specified in `setings.TEMPLATE_DIRS`. You can check previous versions of django and see that this is not a new addition (in fact it's been this way since django 1.0). With the default settings, `TEMPLATE_DIRS` will take precedence over any app-specific templates so any templates you provide in thos directory will be used over the ones defined by `contrib.admin`. I'm closing this ticket as `invalid` since the behavior described appears not to be a bug (and furthermore, there is no change between 1.4 and 1.5). -- Ticket URL: <https://code.djangoproject.com/ticket/20186#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.