Monday 15 February 2010

Django template does not change when `TEMPLATE_DIRS` is modified -



Django template does not change when `TEMPLATE_DIRS` is modified -

i next tutorial in offical documentation https://docs.djangoproject.com/en/1.7/intro/tutorial02/

i in section of customizing templates, running problems changing content of templates

this in settings.py

template_dirs = [os.path.join(base_dir, 'templates')] print template_dirs

here tree structure

└── mysite ├── manage.py ├── mysite ├── polls └── templates └── admin └── base_site.html

i double check path using print, should correct

['/users/mysite/templates']

and edit base_site.html to

{% block title %}{{ title }} | {{ site_title|default:_('poll admin') }}{% endblock %}

however seems cannot see changes when rerun

python manage.py runserver

the other questions seems have path problem, think path correct,

http://stackoverflow.com/questions/4921080/how-do-i-change-templates-on-django-admin-pages

django django-templates

No comments:

Post a Comment