{"action":"created","issue":{"url":"https://api.github.com/repos/macropin/django-registration/issues/50","labels_url":"https://api.github.com/repos/macropin/django-registration/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/macropin/django-registration/issues/50/comments","events_url":"https://api.github.com/repos/macropin/django-registration/issues/50/events","html_url":"https://github.com/macropin/django-registration/issues/50","id":73563478,"number":50,"title":"Can't override email template as Django returns original as first match","user":{"login":"riklaunim","id":1822699,"avatar_url":"https://avatars.githubusercontent.com/u/1822699?v=3","gravatar_id":"","url":"https://api.github.com/users/riklaunim","html_url":"https://github.com/riklaunim","followers_url":"https://api.github.com/users/riklaunim/followers","following_url":"https://api.github.com/users/riklaunim/following{/other_user}","gists_url":"https://api.github.com/users/riklaunim/gists{/gist_id}","starred_url":"https://api.github.com/users/riklaunim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riklaunim/subscriptions","organizations_url":"https://api.github.com/users/riklaunim/orgs","repos_url":"https://api.github.com/users/riklaunim/repos","events_url":"https://api.github.com/users/riklaunim/events{/privacy}","received_events_url":"https://api.github.com/users/riklaunim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-06T08:58:07Z","updated_at":"2015-05-17T11:23:50Z","closed_at":null,"body":"After upgrading from old django-registration to redux version my email template rendering blow up. \r\n\r\nWhen I use django:\r\n   loader.select_template(['registration/activation_email.txt'])\r\nI get the django-registration original template (while my overriden template is in my_app/templates/registration/activation_email.txt). The my_app/templates is discovered by AppDirectory template loader, it's on the django.template.loaders.app_directories.app_template_dirs folders list, but after \"registration\" app templates folder (as it's after \"registration\" on the INSTALLED_APPS lists).\r\n\r\nselect_template calls get_template which returns first match. For some reason it worked before, but now (Django 1.7.7 and @master django-registration-redux) it does not. I can hack it by providing dirs value (either filtered or reversed):\r\n\r\n        from django.template.loaders.app_directories import app_template_dirs\r\n        dirs = sorted(app_template_dirs, reverse=True)\r\n        template = loader.select_template(['registration/activation_email.txt'], dirs=dirs)\r\n\r\nBut it would be good to know why and what is going on. It should \"just work\"."},"comment":{"url":"https://api.github.com/repos/macropin/django-registration/issues/comments/102785512","html_url":"https://github.com/macropin/django-registration/issues/50#issuecomment-102785512","issue_url":"https://api.github.com/repos/macropin/django-registration/issues/50","id":102785512,"user":{"login":"michela","id":99073,"avatar_url":"https://avatars.githubusercontent.com/u/99073?v=3","gravatar_id":"","url":"https://api.github.com/users/michela","html_url":"https://github.com/michela","followers_url":"https://api.github.com/users/michela/followers","following_url":"https://api.github.com/users/michela/following{/other_user}","gists_url":"https://api.github.com/users/michela/gists{/gist_id}","starred_url":"https://api.github.com/users/michela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michela/subscriptions","organizations_url":"https://api.github.com/users/michela/orgs","repos_url":"https://api.github.com/users/michela/repos","events_url":"https://api.github.com/users/michela/events{/privacy}","received_events_url":"https://api.github.com/users/michela/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T11:23:50Z","updated_at":"2015-05-17T11:23:50Z","body":"AMeng, I haven't seen this issue with any other apps. Stripped out legacy loaders that aren't used in Django 1.8 startproject script\r\n\r\nTEMPLATE_LOADERS = (\r\n\t'django.template.loaders.app_directories.Loader',\r\n)\r\nTEMPLATE_DIRS = (os.path.join(BASE_DIR, \"templates\"),)\r\nINSTALLED_APPS = (\r\n\t'django.contrib.staticfiles',\r\n\t'django_extensions',\r\n    'django.contrib.auth',\r\n    'django.contrib.contenttypes',\r\n    'django.contrib.sessions',\r\n    'django.contrib.sites',\r\n    'django.contrib.messages',\r\n    # Uncomment the next line to enable the admin:\r\n    'django.contrib.admin',\r\n    # Uncomment the next line to enable admin documentation:\r\n    'django.contrib.admindocs',\r\n\t'django_granular_permissions',\r\n\t'prod',\r\n    'registration',\r\n\t'rest_framework',\r\n    'debug_toolbar',\r\n#\t'django_mobile',\r\n\t'django_nose',\r\n\t'paypal.standard.ipn',\r\n\t'django_jenkins',\r\n\t'floppyforms',\r\n)"}}