Code

Ticket #8132: 8132.tutorial.diff

File 8132.tutorial.diff, 1.7 KB (added by julien, 6 years ago)
Line 
1Index: django/django/docs/tutorial02.txt
2===================================================================
3--- django/django/docs/tutorial02.txt   (revision 8210)
4+++ django/django/docs/tutorial02.txt   (working copy)
5@@ -435,18 +435,17 @@
6 On a similar note, you might want to customize the look and feel of the Django
7 admin index page.
8 
9-By default, it displays all available apps, according to your ``INSTALLED_APPS``
10-setting. But the order in which it displays things is random, and you may want
11-to make significant changes to the layout. After all, the index is probably the
12+By default, it displays all available apps -- according to your ``INSTALLED_APPS``
13+setting -- in alphabetical order. Yet, you may want to change that order or even
14+make significant changes to the layout. After all, the index is probably the
15 most important page of the admin, and it should be easy to use.
16 
17 The template to customize is ``admin/index.html``. (Do the same as with
18 ``admin/base_site.html`` in the previous section -- copy it from the default
19 directory to your custom template directory.) Edit the file, and you'll see it
20-uses a template tag called ``{% get_admin_app_list as app_list %}``. That's the
21-magic that retrieves every installed Django app. Instead of using that, you can
22-hard-code links to object-specific admin pages in whatever way you think is
23-best.
24+uses a variable called ``app_list``. That's the variable that contains every
25+installed Django app. Instead of using that, you can hard-code links to
26+object-specific admin pages in whatever way you think is best.
27 
28 Django offers another shortcut in this department. Run the command
29 ``python manage.py adminindex polls`` to get a chunk of template code for