1

I've been learning from the Django Documentation and have stumbled upon a road block in the section: https://docs.djangoproject.com/en/1.7/intro/tutorial02/#customize-the-admin-look-and-feel

My files are arranged as:

mysite/

    mysite/

        __pycache__/
            ...

        __init__.py
        settings.py
        urls.py
        wsgi.py

    polls/

        __pycache__/
            ...

        migrations/
            ...

        __init__.py
        admin.py
        models.py
        tests.py
        views.py

    templates/
        admin/
            base_site.html

    db.sqlite3
    manage.py

I have modified the text in the file base_site.html to "Polls App" but the admin site continues to display "Django Administration".

PS: I'm using Win8

rohithpr
  • 6,050
  • 8
  • 36
  • 60
  • Same issue for me with python 2.7.8, django 1.7 under Linux... Just started pythoning and djangoing, not best start conditions... Found the solution in another question – jdehaan Oct 01 '14 at 08:25
  • possible duplicate of [Django 1.7 - updating base\_site.html not working](http://stackoverflow.com/questions/25727687/django-1-7-updating-base-site-html-not-working) – jdehaan Oct 01 '14 at 08:28
  • Yes, that did the job! :) Thanks a lot. – rohithpr Oct 01 '14 at 17:42

2 Answers2

0

You need to place that templates folder in the project directory, not on the same level as the project as it currently is.

So place it under mysite/templates and you should be close.

EDIT: Actually, put the templates folder under your application so that it is Polls/templates

awwester
  • 9,623
  • 13
  • 45
  • 72
0

I have it at the same place as you, right under the project root. Make sure that django.contrib.admin is defined before your polls app in INSTALLED_APPS.

Leticia
  • 171
  • 2
  • 6
  • Yes it is! `code` TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'polls', ) `code` – rohithpr Sep 25 '14 at 16:17