Fixed #26020 -- Normalized header stylings in docs.

This commit is contained in:
Elif T. Kus 2016-01-03 12:56:22 +02:00 committed by Tim Graham
parent 79d0a4fdb0
commit bca9faae95
132 changed files with 1498 additions and 1464 deletions

View file

@ -1,8 +1,9 @@
==============
FAQ: The admin
==============
I can't log in. When I enter a valid username and password, it just brings up the login page again, with no error messages.
---------------------------------------------------------------------------------------------------------------------------
===========================================================================================================================
The login cookie isn't being set correctly, because the domain of the cookie
sent out by Django doesn't match the domain in your browser. Try these two
@ -14,7 +15,7 @@ things:
should set :setting:`SESSION_COOKIE_DOMAIN` = 'www.example.com'.
I can't log in. When I enter a valid username and password, it brings up the login page again, with a "Please enter a correct username and password" error.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
===========================================================================================================================================================
If you're sure your username and password are correct, make sure your user
account has :attr:`~django.contrib.auth.models.User.is_active` and
@ -22,7 +23,7 @@ account has :attr:`~django.contrib.auth.models.User.is_active` and
only allows access to users with those two fields both set to True.
How do I automatically set a field's value to the user who last edited the object in the admin?
-----------------------------------------------------------------------------------------------
===============================================================================================
The :class:`~django.contrib.admin.ModelAdmin` class provides customization hooks
that allow you to transform an object as it saved, using details from the
@ -32,7 +33,7 @@ object to reflect the user that edited it. See :ref:`the documentation on
ModelAdmin methods <model-admin-methods>` for an example.
How do I limit admin access so that objects can only be edited by the users who created them?
---------------------------------------------------------------------------------------------
=============================================================================================
The :class:`~django.contrib.admin.ModelAdmin` class also provides customization
hooks that allow you to control the visibility and editability of objects in the
@ -42,13 +43,13 @@ admin. Using the same trick of extracting the user from the request, the
control the visibility and editability of objects in the admin.
My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_wsgi.
---------------------------------------------------------------------------------------------------------------------------
=========================================================================================================================
See :ref:`serving the admin files <serving-the-admin-files>`
in the "How to use Django with mod_wsgi" documentation.
My "list_filter" contains a ManyToManyField, but the filter doesn't display.
----------------------------------------------------------------------------
============================================================================
Django won't bother displaying the filter for a ``ManyToManyField`` if there
are fewer than two related objects.
@ -59,7 +60,7 @@ database, it won't display a "Site" filter. In that case, filtering by site
would be meaningless.
Some objects aren't appearing in the admin.
-------------------------------------------
===========================================
Inconsistent row counts may be caused by missing foreign key values or a
foreign key field incorrectly set to :attr:`null=False
@ -71,7 +72,7 @@ shown in the admin changelist because the Django model is declaring an
integrity constraint that is not implemented at the database level.
How can I customize the functionality of the admin interface?
-------------------------------------------------------------
=============================================================
You've got several options. If you want to piggyback on top of an add/change
form that Django automatically generates, you can attach arbitrary JavaScript
@ -89,7 +90,7 @@ If you want to customize the look-and-feel of the admin interface, read the
next question.
The dynamically-generated admin site is ugly! How can I change it?
------------------------------------------------------------------
==================================================================
We like it, but if you don't agree, you can modify the admin site's
presentation by editing the CSS stylesheet and/or associated image files. The
@ -97,7 +98,7 @@ site is built using semantic HTML and plenty of CSS hooks, so any changes you'd
like to make should be possible by editing the stylesheet.
What browsers are supported for using the admin?
------------------------------------------------
================================================
The admin provides a fully-functional experience to `YUI's A-grade`_ browsers,
with the notable exception of IE6, which is not supported.

View file

@ -1,14 +1,15 @@
======================
FAQ: Contributing code
======================
How can I get started contributing code to Django?
--------------------------------------------------
==================================================
Thanks for asking! We've written an entire document devoted to this question.
It's titled :doc:`Contributing to Django </internals/contributing/index>`.
I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
--------------------------------------------------------------------------------------------
============================================================================================
Don't worry: We're not ignoring you!
@ -43,7 +44,7 @@ we'll just close the ticket. So if your ticket is still open, it doesn't mean
we're ignoring you; it just means we haven't had time to look at it yet.
When and how might I remind the core team of a patch I care about?
------------------------------------------------------------------
==================================================================
A polite, well-timed message to the mailing list is one way to get attention.
To determine the right time, you need to keep an eye on the schedule. If you
@ -70,7 +71,7 @@ additional attention -- certainly not the attention that you need in order to
get your pet bug addressed.
But I've reminded you several times and you keep ignoring my patch!
-------------------------------------------------------------------
===================================================================
Seriously - we're not ignoring you. If your patch stands no chance of
inclusion in Django, we'll close the ticket. For all the other tickets, we

View file

@ -1,8 +1,9 @@
============
FAQ: General
============
Why does this project exist?
----------------------------
============================
Django grew from a very practical need: World Online, a newspaper Web
operation, is responsible for building intensive Web applications on journalism
@ -29,7 +30,7 @@ thrilled to be able to give something back to the open-source community.
.. _PostgreSQL: http://www.postgresql.org/
What does "Django" mean, and how do you pronounce it?
-----------------------------------------------------
=====================================================
Django is named after `Django Reinhardt`_, a gypsy jazz guitarist from the 1930s
to early 1950s. To this day, he's considered one of the best guitarists of all time.
@ -44,14 +45,14 @@ We've also recorded an `audio clip of the pronunciation`_.
.. _audio clip of the pronunciation: http://red-bean.com/~adrian/django_pronunciation.mp3
Is Django stable?
-----------------
=================
Yes, it's quite stable. Companies like Disqus, Instagram, Pinterest, and
Mozilla have been using Django for many years. Sites built on Django have
weathered traffic spikes of over 50 thousand hits per second.
Does Django scale?
------------------
==================
Yes. Compared to development time, hardware is cheap, and so Django is
designed to take advantage of as much hardware as you can throw at it.
@ -64,14 +65,14 @@ application layer. And it ships with a simple-yet-powerful
:doc:`cache framework </topics/cache>`.
Who's behind this?
------------------
==================
Django was originally developed at World Online, the Web department of a
newspaper in Lawrence, Kansas, USA. Django's now run by an international
:doc:`team of volunteers </internals/team>`.
Which sites use Django?
-----------------------
=======================
`DjangoSites.org`_ features a constantly growing list of Django-powered sites.
@ -80,7 +81,7 @@ Which sites use Django?
.. _faq-mtv:
Django appears to be a MVC framework, but you call the Controller the "view", and the View the "template". How come you don't use the standard names?
-----------------------------------------------------------------------------------------------------------------------------------------------------
=====================================================================================================================================================
Well, the standard names are debatable.
@ -110,7 +111,7 @@ regardless of how things are named, Django gets stuff done in a way that's most
logical to us.
<Framework X> does <feature Y> -- why doesn't Django?
-----------------------------------------------------
=====================================================
We're well aware that there are other awesome Web frameworks out there, and
we're not averse to borrowing ideas where appropriate. However, Django was
@ -119,7 +120,7 @@ aware that "because <Framework X> does it" is not going to be sufficient reason
to add a given feature to Django.
Why did you write all of Django from scratch, instead of using other Python libraries?
--------------------------------------------------------------------------------------
======================================================================================
When Django was originally written a couple of years ago, Adrian and Simon
spent quite a bit of time exploring the various Python Web frameworks
@ -145,7 +146,7 @@ We've documented our philosophies on the
:doc:`design philosophies page </misc/design-philosophies>`.
Is Django a content-management-system (CMS)?
--------------------------------------------
============================================
No, Django is not a CMS, or any sort of "turnkey product" in and of itself.
It's a Web framework; it's a programming tool that lets you build websites.
@ -162,7 +163,7 @@ means!).
.. _Drupal: https://drupal.org/
How can I download the Django documentation to read it offline?
---------------------------------------------------------------
===============================================================
The Django docs are available in the ``docs`` directory of each Django tarball
release. These docs are in reST (reStructuredText) format, and each text file
@ -178,7 +179,7 @@ information than the docs that come with the latest Django release.
.. _stored in revision control: https://github.com/django/django/tree/master/docs/
Where can I find Django developers for hire?
--------------------------------------------
============================================
Consult our `developers for hire page`_ for a list of Django developers who
would be happy to help you.
@ -190,7 +191,7 @@ https://people.djangoproject.com/ .
.. _developers for hire page: https://code.djangoproject.com/wiki/DevelopersForHire
How do I cite Django?
---------------------
=====================
It's difficult to give an official citation format, for two reasons: citation
formats can vary wildly between publications, and citation standards for

View file

@ -1,8 +1,9 @@
=================
FAQ: Getting Help
=================
How do I do X? Why doesn't Y work? Where can I go to get help?
--------------------------------------------------------------
==============================================================
If this FAQ doesn't contain an answer to your question, you might want to
try the |django-users| mailing list. Feel free to ask any question related
@ -16,7 +17,7 @@ active community of helpful individuals who may be able to solve your problem.
.. _message-does-not-appear-on-django-users:
Why hasn't my message appeared on django-users?
-----------------------------------------------
===============================================
|django-users| has a lot of subscribers. This is good for the community, as
it means many people are available to contribute answers to questions.
@ -30,7 +31,7 @@ list might take a little longer to get answered. We apologize for any
inconvenience that this policy may cause.
Nobody on django-users answered my question! What should I do?
--------------------------------------------------------------
==============================================================
Try making your question more specific, or provide a better example of your
problem.
@ -48,13 +49,13 @@ for discussion of the development of Django itself. Asking a tech support
question there is considered quite impolite.
I think I've found a bug! What should I do?
-------------------------------------------
===========================================
Detailed instructions on how to handle a potential bug can be found in our
:ref:`Guide to contributing to Django <reporting-bugs>`.
I think I've found a security problem! What should I do?
--------------------------------------------------------
========================================================
If you think you've found a security problem with Django, please send a message
to security@djangoproject.com. This is a private list only open to long-time,

View file

@ -1,8 +1,9 @@
=================
FAQ: Installation
=================
How do I get started?
---------------------
=====================
#. `Download the code`_.
#. Install Django (read the :doc:`installation guide </intro/install>`).
@ -14,7 +15,7 @@ How do I get started?
.. _ask questions: https://www.djangoproject.com/community/
What are Django's prerequisites?
--------------------------------
================================
Django requires Python. See the table in the next question for the versions of
Python that work with each version of Django. Other Python libraries may be
@ -40,7 +41,7 @@ PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.
.. _faq-python-version-support:
What Python version can I use with Django?
------------------------------------------
==========================================
============== ===============
Django version Python versions
@ -60,7 +61,7 @@ version of Python ends. For example, Python 3.3 security support ends September
is the last version to support Python 3.3.
What Python version should I use with Django?
---------------------------------------------
=============================================
As of Django 1.6, Python 3 support is considered stable and you can safely use
it in production. See also :doc:`/topics/python3`. However, the community is
@ -81,7 +82,7 @@ Third-party applications for use with Django are, of course, free to set their
own version requirements.
Should I use the stable version or development version?
-------------------------------------------------------
=======================================================
Generally, if you're using code in production, you should be using a
stable release. The Django project publishes a full stable release

View file

@ -1,10 +1,11 @@
=========================
FAQ: Databases and models
=========================
.. _faq-see-raw-sql-queries:
How can I see the raw SQL queries Django is running?
----------------------------------------------------
====================================================
Make sure your Django :setting:`DEBUG` setting is set to ``True``.
Then, just do this::
@ -37,12 +38,12 @@ just call ``reset_queries()``, like this::
reset_queries()
Can I use Django with a pre-existing database?
----------------------------------------------
==============================================
Yes. See :doc:`Integrating with a legacy database </howto/legacy-databases>`.
If I make changes to a model, how do I update the database?
-----------------------------------------------------------
===========================================================
Take a look at Django's support for :mod:`schema migrations
<django.db.migrations>`.
@ -52,7 +53,7 @@ If you don't mind clearing data, your project's ``manage.py`` utility has a
immediately after :djadmin:`migrate` was executed.
Do Django models support multiple-column primary keys?
------------------------------------------------------
======================================================
No. Only single-column primary keys are supported.
@ -64,7 +65,7 @@ as the admin interface to work; e.g., you need a simple way of being able to
specify an object to edit or delete.
Does Django support NoSQL databases?
------------------------------------
====================================
NoSQL databases are not officially supported by Django itself. There are,
however, a number of side project and forks which allow NoSQL functionality in
@ -76,7 +77,7 @@ You can also take a look on `the wiki page`_ which discusses some alternatives.
.. _`the wiki page`: https://code.djangoproject.com/wiki/NoSqlSupport
How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type?
------------------------------------------------------------------------------------------------------------------
==================================================================================================================
We try to avoid adding special cases in the Django code to accommodate all the
database-specific options such as table type, etc. If you'd like to use any of

View file

@ -1,8 +1,9 @@
=================
FAQ: Using Django
=================
Why do I get an error about importing DJANGO_SETTINGS_MODULE?
-------------------------------------------------------------
=============================================================
Make sure that:
@ -14,7 +15,7 @@ Make sure that:
* The module doesn't contain syntax errors (of course).
I can't stand your template language. Do I have to use it?
----------------------------------------------------------
==========================================================
We happen to think our template engine is the best thing since chunky bacon,
but we recognize that choosing a template language runs close to religion.
@ -22,7 +23,7 @@ There's nothing about Django that requires using the template language, so
if you're attached to Jinja2, Mako, or whatever, feel free to use those.
Do I have to use your model/database layer?
-------------------------------------------
===========================================
Nope. Just like the template system, the model/database layer is decoupled from
the rest of the framework.
@ -32,7 +33,7 @@ use Django's automatically-generated admin site. That app is coupled to the
Django database layer.
How do I use image and file fields?
-----------------------------------
===================================
Using a :class:`~django.db.models.FileField` or an
:class:`~django.db.models.ImageField` in a model takes a few steps:
@ -58,7 +59,7 @@ Using a :class:`~django.db.models.FileField` or an
``{{ object.mug_shot.url }}``.
How do I make a variable available to all my templates?
-------------------------------------------------------
=======================================================
Sometimes your templates just all need the same thing. A common example would
be dynamically-generated menus. At first glance, it seems logical to simply