-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Hi,
the actual code of the application enforce the 'installation' in the actual project directory, where it can find the 'templates' one.
It should be interesting to be able to install django-multisite systemwide or anywhere in the PYTHONPATH without this restriction.
Please look at the following patch which i think solves the problem (using TEMPLATE_DIRS[0]):
--- a/multisite/template_loader.py
+++ b/multisite/template_loader.py
@@ -5,7 +5,7 @@ from django.contrib.sites.models import Site
from django.conf import settings
def get_template_sources(template_name, template_dirs=None):
- template_dir = os.path.join(os.path.normpath(os.path.dirname(__file__)), '..', 'templates', Site.objects.get_current().domain)
+ template_dir = os.path.join(settings.TEMPLATE_DIRS[0], Site.objects.get_current().domain)
try:
yield safe_join(template_dir, template_name)
except UnicodeDecodeError:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels