Ticket #19315: faq_admin.txt.diff

File faq_admin.txt.diff, 2.4 KB (added by ClaesBas, 12 years ago)
  • docs/faq/admin.txt

    diff --git a/docs/faq/admin.txt b/docs/faq/admin.txt
    index 872ad25..0e3913d 100644
    a b things:  
    1111* Set the :setting:`SESSION_COOKIE_DOMAIN` setting in your admin config
    1212  file to match your domain. For example, if you're going to
    1313  "http://www.example.com/admin/" in your browser, in
    14   "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.example.com'``.
     14  "myproject.settings" you should set :setting:`SESSION_COOKIE_DOMAIN` = 'www.example.com'.
    1515
    1616* Some browsers (Firefox?) don't like to accept cookies from domains that
    1717  don't have dots in them. If you're running the admin site on "localhost"
    I can't log in. When I enter a valid username and password, it brings up the log  
    2323-----------------------------------------------------------------------------------------------------------------------------------------------------------
    2424
    2525If 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
     26account has :attr:`~django.contrib.auth.models.User.is_active` and :attr:`~django.contrib.auth.models.User.is_staff` set to True. The admin site only
    2727allows access to users with those two fields both set to True.
    2828
    2929How can I prevent the cache middleware from caching the admin site?
    My "list_filter" contains a ManyToManyField, but the filter doesn't display.  
    6464Django won't bother displaying the filter for a ``ManyToManyField`` if there
    6565are fewer than two related objects.
    6666
    67 For example, if your ``list_filter`` includes ``sites``, and there's only one
     67For example, if your :attr:`~django.contrib.admin.ModelAdmin.list_filter` includes :doc:`sites </ref/contrib/sites>`, and there's only one
    6868site in your database, it won't display a "Site" filter. In that case,
    6969filtering by site would be meaningless.
    7070
    How can I customize the functionality of the admin interface?  
    8585
    8686You've got several options. If you want to piggyback on top of an add/change
    8787form that Django automatically generates, you can attach arbitrary JavaScript
    88 modules to the page via the model's ``class Admin`` ``js`` parameter. That
     88modules to the page via the model's :ref:`class Admin js<modeladmin-media-definitions>` parameter. That
    8989parameter is a list of URLs, as strings, pointing to JavaScript modules that
    9090will be included within the admin form via a ``<script>`` tag.
    9191
Back to Top