Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #19315 -- Improved markup in admin FAQ.

Thanks ClaesBas.
  • Loading branch information...
commit ccb2b574e8ea961f11b1c36bcbdf396cd9acb550 1 parent 4585e12
Aymeric Augustin authored November 17, 2012
23  docs/faq/admin.txt
@@ -10,8 +10,8 @@ things:
10 10
 
11 11
 * Set the :setting:`SESSION_COOKIE_DOMAIN` setting in your admin config
12 12
   file to match your domain. For example, if you're going to
13  
-  "http://www.example.com/admin/" in your browser, in
14  
-  "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.example.com'``.
  13
+  "http://www.example.com/admin/" in your browser, in "myproject.settings" you
  14
+  should set :setting:`SESSION_COOKIE_DOMAIN` = 'www.example.com'.
15 15
 
16 16
 * Some browsers (Firefox?) don't like to accept cookies from domains that
17 17
   don't have dots in them. If you're running the admin site on "localhost"
@@ -23,8 +23,9 @@ I can't log in. When I enter a valid username and password, it brings up the log
23 23
 -----------------------------------------------------------------------------------------------------------------------------------------------------------
24 24
 
25 25
 If you're sure your username and password are correct, make sure your user
26  
-account has ``is_active`` and ``is_staff`` set to True. The admin site only
27  
-allows access to users with those two fields both set to True.
  26
+account has :attr:`~django.contrib.auth.models.User.is_active` and
  27
+:attr:`~django.contrib.auth.models.User.is_staff` set to True. The admin site
  28
+only allows access to users with those two fields both set to True.
28 29
 
29 30
 How can I prevent the cache middleware from caching the admin site?
30 31
 -------------------------------------------------------------------
@@ -64,9 +65,10 @@ My "list_filter" contains a ManyToManyField, but the filter doesn't display.
64 65
 Django won't bother displaying the filter for a ``ManyToManyField`` if there
65 66
 are fewer than two related objects.
66 67
 
67  
-For example, if your ``list_filter`` includes ``sites``, and there's only one
68  
-site in your database, it won't display a "Site" filter. In that case,
69  
-filtering by site would be meaningless.
  68
+For example, if your :attr:`~django.contrib.admin.ModelAdmin.list_filter`
  69
+includes :doc:`sites </ref/contrib/sites>`, and there's only one site in your
  70
+database, it won't display a "Site" filter. In that case, filtering by site
  71
+would be meaningless.
70 72
 
71 73
 Some objects aren't appearing in the admin.
72 74
 -------------------------------------------
@@ -85,9 +87,10 @@ How can I customize the functionality of the admin interface?
85 87
 
86 88
 You've got several options. If you want to piggyback on top of an add/change
87 89
 form that Django automatically generates, you can attach arbitrary JavaScript
88  
-modules to the page via the model's ``class Admin`` ``js`` parameter. That
89  
-parameter is a list of URLs, as strings, pointing to JavaScript modules that
90  
-will be included within the admin form via a ``<script>`` tag.
  90
+modules to the page via the model's class Admin :ref:`js parameter
  91
+<modeladmin-media-definitions>`. That parameter is a list of URLs, as strings,
  92
+pointing to JavaScript modules that will be included within the admin form via
  93
+a ``<script>`` tag.
91 94
 
92 95
 If you want more flexibility than simply tweaking the auto-generated forms,
93 96
 feel free to write custom views for the admin. The admin is powered by Django
2  docs/ref/contrib/admin/index.txt
@@ -1377,6 +1377,8 @@ instances which allow you to easily customize the response data before
1377 1377
 rendering. For more details, see the
1378 1378
 :doc:`TemplateResponse documentation </ref/template-response>`.
1379 1379
 
  1380
+.. _modeladmin-media-definitions:
  1381
+
1380 1382
 ``ModelAdmin`` media definitions
1381 1383
 --------------------------------
1382 1384
 

0 notes on commit ccb2b57

Please sign in to comment.
Something went wrong with that request. Please try again.