filmov
tv
Python/Django Development 5 of 12 - Using Templates and Static media in Django project

Показать описание
(1) Get my baseline project from GitHub:
(2) Read the README file comes with the "youtube5" repository. Follow the steps stated in the README.
(3) Link to Tango with Django Class Book:
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
TEMPLATE_PATH,
)
(5) Tell Django where is your "Static" directory are:
STATIC_URL = '/static/' # You may find this is already defined as such.
STATICFILES_DIRS = (
STATIC_PATH,
)
(2) Read the README file comes with the "youtube5" repository. Follow the steps stated in the README.
(3) Link to Tango with Django Class Book:
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
TEMPLATE_PATH,
)
(5) Tell Django where is your "Static" directory are:
STATIC_URL = '/static/' # You may find this is already defined as such.
STATICFILES_DIRS = (
STATIC_PATH,
)