#23575: Templates override with Admin Site TEMPLATE_DIRS better method
possibly
---------------------------------+--------------------------------------
Reporter: hernandocounty | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: 1.7
Severity: Normal | Resolution:
Keywords: TEMPLATES_DIR | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by hernandocounty):
Customizing your project’s templates
Create a templates directory in your project directory. Templates can live
anywhere on your filesystem that Django can access. (Django runs as
whatever user your server runs.) However, keeping your templates within
the project is a good convention to follow.
Open your settings file (mysite/settings.py, remember) and add a
TEMPLATE_DIRS setting:
mysite/settings.py
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
TEMPLATE_DIRS is an iterable of filesystem directories to check when
loading Django templates; it’s a search path.
Now create a directory called admin inside templates, and copy the
template admin/base_site.html from within the default Django admin
template directory in the source code of Django itself
(django/contrib/admin/templates) into that directory.
this is what I tried along with these solutions also.
i tried these solutions from earlier versions
# TEMPLATE_DIRS = [os.path.join(BASE_DIR,
'/home/<username>/dev/09292014/stocks_day1/templates/')]
TEMPLATE_DIRS = ('/home/<username>/dev/09292014/stocks_day1/templates',)
these i placed in settings.py after trying the method in the tutorial.
Thanks
Doug
--
Ticket URL: <https://code.djangoproject.com/ticket/23575#comment:2>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.503c92d3d759430dbfbbd326a2d8e651%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.