Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7587 closed (worksforme)

Find out where the default admin/base_site.html is on your system (for: Tut 2, page 2)

Reported by: HenkPoley Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The file is referenced in: http://www.djangoproject.com/documentation/0.96/tutorial02/#customize-the-admin-look-and-feel

People might not know where it can be found when Django is installed with a package manager.

In the python shell:

from django.contrib import admin
admin.__path__[0] + "/templates/admin/base_site.html"

Change History (2)

comment:1 by James Bennett, 16 years ago

Resolution: worksforme
Status: newclosed

The install docs already mention how to find out where your site-packages directory is, and presumably someone who's installed Django will have seen that.

comment:2 by johntynan, 16 years ago

I believe this directory only contains symlinks to the files themselves.

To find the actual base_site.html file, you'll want to find the path to the symlink as described above, cd into the directory containing the symlink to base_site.html, then use the command:

ls base_site.html -l

This will give you the path to the actual file.

Then, you'll want to cd to this directory and, as root, copy the file to your working mysite/templates/admin directory:

sudo cp base_site.html /home/username/.../mysite/templates/admin

Then you'll want to cd into your working directory and change the ownership of the file:

sudo chown username base_site.html

Note: See TracTickets for help on using tickets.
Back to Top