Refs #34140 -- Corrected rst code-block and various formatting issues in docs.

This commit is contained in:
Joseph Victor Zammit 2023-01-23 21:29:05 +01:00 committed by Mariusz Felisiak
parent c67ea79aa9
commit ba755ca131
57 changed files with 443 additions and 269 deletions

View file

@ -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

View file

@ -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,
},
},

View file

@ -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,
...
# ...
},
]