Ticket #8132: 8132.tutorial.diff
File 8132.tutorial.diff, 1.7 KB (added by , 16 years ago) |
---|
-
django/django/docs/tutorial02.txt
435 435 On a similar note, you might want to customize the look and feel of the Django 436 436 admin index page. 437 437 438 By default, it displays all available apps ,according to your ``INSTALLED_APPS``439 setting . But the order in which it displays things is random, and you may want440 tomake significant changes to the layout. After all, the index is probably the438 By default, it displays all available apps -- according to your ``INSTALLED_APPS`` 439 setting -- in alphabetical order. Yet, you may want to change that order or even 440 make significant changes to the layout. After all, the index is probably the 441 441 most important page of the admin, and it should be easy to use. 442 442 443 443 The template to customize is ``admin/index.html``. (Do the same as with 444 444 ``admin/base_site.html`` in the previous section -- copy it from the default 445 445 directory to your custom template directory.) Edit the file, and you'll see it 446 uses a template tag called ``{% get_admin_app_list as app_list %}``. That's the 447 magic that retrieves every installed Django app. Instead of using that, you can 448 hard-code links to object-specific admin pages in whatever way you think is 449 best. 446 uses a variable called ``app_list``. That's the variable that contains every 447 installed Django app. Instead of using that, you can hard-code links to 448 object-specific admin pages in whatever way you think is best. 450 449 451 450 Django offers another shortcut in this department. Run the command 452 451 ``python manage.py adminindex polls`` to get a chunk of template code for