9

I'm using django-registration for registering users, however when I want to use my own template for password reset I get the admin template and not the template I created. My template is in myapp/templates/registration/password_reset_form.html and my template loaders are properly set:

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    )

What could I be missing?

I'm using Django 1.4

ip.
  • 3,306
  • 6
  • 32
  • 42

1 Answers1

22

Could it be that django.contrib.auth comes before myapp in your INSTALLED_APPS? That would mean that django finds the original template first and uses this one. More on this in the docs: https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types

pyjavo
  • 1,598
  • 2
  • 23
  • 41
ptrck
  • 731
  • 5
  • 13
  • I don't think that is it, according to the documentation the TEMPLATE_LOADERS states where to look up a template first – ip. Nov 28 '12 at 10:34
  • That's right. But the app_directories.Loader will find both the django.contrib.auth templates and your customized template. Because those are both equal apps to django. That means the template of the app that is stated first will be loaded first. But of course only if you don't have a TEMPLATE_DIRS setting defined. – ptrck Nov 28 '12 at 10:44
  • I tried rearranging the installed apps and it works now.. so I'm acknowledging your answer... but it's weird because I do have TEMPLATE_DIRS defined – ip. Nov 28 '12 at 11:45