mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
This commit is contained in:
parent
c67ea79aa9
commit
ba755ca131
57 changed files with 443 additions and 269 deletions
|
@ -51,7 +51,7 @@ Lookup registration can also be done using a decorator pattern::
|
|||
|
||||
@Field.register_lookup
|
||||
class NotEqualLookup(Lookup):
|
||||
# ...
|
||||
...
|
||||
|
||||
We can now use ``foo__ne`` for any field ``foo``. You will need to ensure that
|
||||
this registration happens before you try to create any querysets using it. You
|
||||
|
|
|
@ -117,7 +117,7 @@ file ``general.log`` (at the project root):
|
|||
:emphasize-lines: 3-8
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'handlers': {
|
||||
'file': {
|
||||
'class': 'logging.FileHandler',
|
||||
|
@ -156,7 +156,7 @@ example:
|
|||
:emphasize-lines: 3-8
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'loggers': {
|
||||
'': {
|
||||
'level': 'DEBUG',
|
||||
|
@ -195,7 +195,7 @@ formatters named ``verbose`` and ``simple``:
|
|||
:emphasize-lines: 3-12
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'formatters': {
|
||||
'verbose': {
|
||||
'format': '{name} {levelname} {asctime} {module} {process:d} {thread:d} {message}',
|
||||
|
@ -226,7 +226,7 @@ dictionary referring to the formatter by name, for example:
|
|||
'filename': 'general.log',
|
||||
'formatter': 'verbose',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
.. _naming-loggers:
|
||||
|
||||
|
@ -253,7 +253,7 @@ A logger mapping named ``my_app.views`` will capture records from this logger:
|
|||
:emphasize-lines: 4
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'loggers': {
|
||||
'my_app.views': {
|
||||
...
|
||||
|
@ -269,7 +269,7 @@ from loggers anywhere within the ``my_app`` namespace (including
|
|||
:emphasize-lines: 4
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'loggers': {
|
||||
'my_app': {
|
||||
...
|
||||
|
@ -297,16 +297,16 @@ by a mapping for both ``my_app`` and ``my_app.views``.
|
|||
To manage this behavior, set the propagation key on the mappings you define::
|
||||
|
||||
LOGGING = {
|
||||
[...]
|
||||
# ...
|
||||
'loggers': {
|
||||
'my_app': {
|
||||
[...]
|
||||
# ...
|
||||
},
|
||||
'my_app.views': {
|
||||
[...]
|
||||
# ...
|
||||
},
|
||||
'my_app.views.private': {
|
||||
[...]
|
||||
# ...
|
||||
'propagate': False,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -42,7 +42,7 @@ called ``blog``, which provides the templates ``blog/post.html`` and
|
|||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'APP_DIRS': True,
|
||||
...
|
||||
# ...
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -77,9 +77,9 @@ First, make sure your template settings are checking inside app directories::
|
|||
|
||||
TEMPLATES = [
|
||||
{
|
||||
...,
|
||||
# ...
|
||||
'APP_DIRS': True,
|
||||
...
|
||||
# ...
|
||||
},
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue