mirror of https://github.com/zulip/zulip.git
docs: Update all links to Django docs to point to version /3.2/.
Previously, our docs had links to various versions of the Django docs, eg https://docs.djangoproject.com/en/1.10/topics/migrations/ and https://docs.djangoproject.com/en/2.0/ref/signals/#post-save, opening a link to a doc with an outdated Django version would show a warning "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!". This commit uses a search with the regex "docs.djangoproject.com/en/([0-9].[0-9]*)/" and replaces all matches inside the /docs/ folder with "docs.djangoproject.com/en/3.2/". All the new links in this commit have been generated by the above replace and each link has then been manually checked to ensure that (1) the page still exists and has not been moved to a new location (and it has been found that no page has been moved like this), (2) that the anchor that we're linking to has not been changed (and it has been found that this happened once, for https://docs.djangoproject.com /en/1.8/ref/django-admin/#runserver-port-or-address-port, where /#runserver-port-or-address-port was changed to /#runserver).
This commit is contained in:
parent
87dd2a15c2
commit
40444cf415
|
@ -94,7 +94,7 @@ for mobile development][mobile-dev-server].
|
|||
|
||||
[rest-api]: https://zulip.com/api/rest
|
||||
[authentication-dev-server]: ./authentication.md
|
||||
[django-runserver]: https://docs.djangoproject.com/en/1.8/ref/django-admin/#runserver-port-or-address-port
|
||||
[django-runserver]: https://docs.djangoproject.com/en/3.2/ref/django-admin/#runserver
|
||||
[new-feature-tutorial]: ../tutorials/new-feature-tutorial.md
|
||||
[testing-docs]: ../testing/testing.md
|
||||
[mobile-dev-server]: https://github.com/zulip/zulip-mobile/blob/main/docs/howto/dev-server.md#using-a-dev-version-of-the-server
|
||||
|
|
|
@ -10,15 +10,15 @@ flow through these files.
|
|||
### Core Python files
|
||||
|
||||
Zulip uses the [Django web
|
||||
framework](https://docs.djangoproject.com/en/1.8/), so a lot of these
|
||||
framework](https://docs.djangoproject.com/en/3.2/), so a lot of these
|
||||
paths will be familiar to Django developers.
|
||||
|
||||
- `zproject/urls.py` Main
|
||||
[Django routes file](https://docs.djangoproject.com/en/1.8/topics/http/urls/).
|
||||
[Django routes file](https://docs.djangoproject.com/en/3.2/topics/http/urls/).
|
||||
Defines which URLs are handled by which view functions or templates.
|
||||
|
||||
- `zerver/models.py` Main
|
||||
[Django models](https://docs.djangoproject.com/en/1.8/topics/db/models/)
|
||||
[Django models](https://docs.djangoproject.com/en/3.2/topics/db/models/)
|
||||
file. Defines Zulip's database tables.
|
||||
|
||||
- `zerver/lib/*.py` Most library code.
|
||||
|
@ -28,7 +28,7 @@ paths will be familiar to Django developers.
|
|||
all code calling `send_event` to trigger [pushing data to
|
||||
clients](../subsystems/events-system.md) must live here.
|
||||
|
||||
- `zerver/views/*.py` Most [Django views](https://docs.djangoproject.com/en/1.8/topics/http/views/).
|
||||
- `zerver/views/*.py` Most [Django views](https://docs.djangoproject.com/en/3.2/topics/http/views/).
|
||||
|
||||
- `zerver/webhooks/` Webhook views and tests for [Zulip's incoming webhook integrations](https://zulip.com/api/incoming-webhooks-overview).
|
||||
|
||||
|
@ -38,7 +38,7 @@ paths will be familiar to Django developers.
|
|||
|
||||
- `zerver/lib/markdown/` [Backend Markdown processor](../subsystems/markdown.md).
|
||||
|
||||
- `zproject/backends.py` [Authentication backends](https://docs.djangoproject.com/en/1.8/topics/auth/customizing/).
|
||||
- `zproject/backends.py` [Authentication backends](https://docs.djangoproject.com/en/3.2/topics/auth/customizing/).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ aren't receiving emails from Zulip:
|
|||
will try to use the TLS protocol on port 465, which won't work.
|
||||
|
||||
- Zulip's email sending configuration is based on the standard Django
|
||||
[SMTP backend](https://docs.djangoproject.com/en/2.0/topics/email/#smtp-backend)
|
||||
[SMTP backend](https://docs.djangoproject.com/en/3.2/topics/email/#smtp-backend)
|
||||
configuration. So if you're having trouble getting your email
|
||||
provider working, you may want to search for documentation related
|
||||
to using your email provider with Django.
|
||||
|
|
|
@ -182,4 +182,4 @@ upgrade.
|
|||
[zulip-api]: https://zulip.com/api/rest
|
||||
[webhook-integrations]: https://zulip.com/api/incoming-webhooks-overview
|
||||
[management-commands-dev]: ../subsystems/management-commands.md
|
||||
[django-management]: https://docs.djangoproject.com/en/2.2/ref/django-admin/#django-admin-and-manage-py
|
||||
[django-management]: https://docs.djangoproject.com/en/3.2/ref/django-admin/#django-admin-and-manage-py
|
||||
|
|
|
@ -262,4 +262,4 @@ cached by clients is changed. Clients are responsible for handling
|
|||
the events, updating their state, and rerendering any UI components
|
||||
that might display the modified state.
|
||||
|
||||
[post-save-signals]: https://docs.djangoproject.com/en/2.0/ref/signals/#post-save
|
||||
[post-save-signals]: https://docs.djangoproject.com/en/3.2/ref/signals/#post-save
|
||||
|
|
|
@ -29,7 +29,7 @@ The `webhook_view` auth decorator, used for most incoming
|
|||
webhooks, accepts the name of the integration as an argument and uses
|
||||
it to generate a client name that it adds to the `request_notes`
|
||||
object that can be accessed with the `request` (Django
|
||||
[HttpRequest](https://docs.djangoproject.com/en/1.8/ref/request-response/#django.http.HttpRequest))
|
||||
[HttpRequest](https://docs.djangoproject.com/en/3.2/ref/request-response/#django.http.HttpRequest))
|
||||
object via `zerver.lib.request.get_request_notes(request)`.
|
||||
|
||||
In most integrations, `request_notes.client` is then passed to
|
||||
|
|
|
@ -179,7 +179,7 @@ a new view:
|
|||
- The time when the browser was idle again after switching views
|
||||
(intended to catch issues where we generate a lot of deferred work).
|
||||
|
||||
[django-errors]: https://docs.djangoproject.com/en/2.2/howto/error-reporting/
|
||||
[django-errors]: https://docs.djangoproject.com/en/3.2/howto/error-reporting/
|
||||
[python-logging]: https://docs.python.org/3/library/logging.html
|
||||
[django-logging]: https://docs.djangoproject.com/en/2.2/topics/logging/
|
||||
[django-logging]: https://docs.djangoproject.com/en/3.2/topics/logging/
|
||||
[sentry]: https://sentry.io
|
||||
|
|
|
@ -62,4 +62,4 @@ to do anything special like restart the server when iteratively
|
|||
testing one, even if testing in a Zulip production environment where
|
||||
the server doesn't normally restart whenever a file is edited.
|
||||
|
||||
[django-docs]: https://docs.djangoproject.com/en/2.2/howto/custom-management-commands/
|
||||
[django-docs]: https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Schema migrations
|
||||
|
||||
Zulip uses the [standard Django system for doing schema
|
||||
migrations](https://docs.djangoproject.com/en/1.10/topics/migrations/).
|
||||
migrations](https://docs.djangoproject.com/en/3.2/topics/migrations/).
|
||||
There is some example usage in the [new feature
|
||||
tutorial](../tutorials/new-feature-tutorial.md).
|
||||
|
||||
|
@ -164,7 +164,7 @@ an incorrect migration messes up a database in a way that's impossible
|
|||
to undo without going to backups.
|
||||
|
||||
[django-migration-test-blog-post]: https://www.caktusgroup.com/blog/2016/02/02/writing-unit-tests-django-migrations/
|
||||
[migrations-non-atomic]: https://docs.djangoproject.com/en/1.10/howto/writing-migrations/#non-atomic-migrations
|
||||
[migrations-non-atomic]: https://docs.djangoproject.com/en/3.2/howto/writing-migrations/#non-atomic-migrations
|
||||
|
||||
## Schema and initial data changes
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ convenient for:
|
|||
## Server settings
|
||||
|
||||
Zulip uses the [Django settings
|
||||
system](https://docs.djangoproject.com/en/2.2/topics/settings/), which
|
||||
system](https://docs.djangoproject.com/en/3.2/topics/settings/), which
|
||||
means that the settings files are Python programs that set a lot of
|
||||
variables with all-capital names like `EMAIL_GATEWAY_PATTERN`. You can
|
||||
access these anywhere in the Zulip Django code using e.g.:
|
||||
|
@ -146,7 +146,7 @@ accessed in initialization of Django (or Zulip) internals
|
|||
(e.g. `DATABASES`). See the [Django docs on overriding settings in
|
||||
tests][django-test-settings] for more details.
|
||||
|
||||
[django-test-settings]: https://docs.djangoproject.com/en/2.2/topics/testing/tools/#overriding-settings
|
||||
[django-test-settings]: https://docs.djangoproject.com/en/3.2/topics/testing/tools/#overriding-settings
|
||||
|
||||
## Realm settings
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ option of Puppet.
|
|||
|
||||
Zulip uses two HTML templating systems:
|
||||
|
||||
- [Django templates](https://docs.djangoproject.com/en/1.10/topics/templates/)
|
||||
- [Django templates](https://docs.djangoproject.com/en/3.2/topics/templates/)
|
||||
- [handlebars](https://handlebarsjs.com/)
|
||||
|
||||
Zulip has an internal tool that validates both types of templates for
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Zulip uses the Django framework for its Python backend. We
|
||||
use the testing framework from
|
||||
[django.test](https://docs.djangoproject.com/en/1.10/topics/testing/)
|
||||
[django.test](https://docs.djangoproject.com/en/3.2/topics/testing/)
|
||||
to test our code. We have over a thousand automated tests that verify that
|
||||
our backend works as expected.
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ application.
|
|||
## Django routes the request to a view in urls.py files
|
||||
|
||||
There are various
|
||||
[urls.py](https://docs.djangoproject.com/en/1.8/topics/http/urls/)
|
||||
[urls.py](https://docs.djangoproject.com/en/3.2/topics/http/urls/)
|
||||
files throughout the server codebase, which are covered in more detail
|
||||
in
|
||||
[the directory structure doc](../overview/directory-structure.md).
|
||||
|
@ -180,7 +180,7 @@ PUT=create_user_backend
|
|||
```
|
||||
|
||||
are supplied as arguments to `rest_path`, along with the
|
||||
[HTTPRequest](https://docs.djangoproject.com/en/1.8/ref/request-response/).
|
||||
[HTTPRequest](https://docs.djangoproject.com/en/3.2/ref/request-response/).
|
||||
The request has the HTTP verb `PUT`, which `rest_dispatch` can use to
|
||||
find the correct view to show:
|
||||
`zerver.views.users.create_user_backend`.
|
||||
|
@ -199,7 +199,7 @@ Our API works on JSON requests and responses. Every API endpoint should
|
|||
```
|
||||
|
||||
in a
|
||||
[HTTP response](https://docs.djangoproject.com/en/1.8/ref/request-response/)
|
||||
[HTTP response](https://docs.djangoproject.com/en/3.2/ref/request-response/)
|
||||
with a content type of 'application/json'.
|
||||
|
||||
To pass back data from the server to the calling client, in the event of
|
||||
|
|
|
@ -20,7 +20,7 @@ tests, use Django's tooling.
|
|||
Zulip's [directory structure](../overview/directory-structure.md)
|
||||
will also be helpful to review when creating a new feature. Many
|
||||
aspects of the structure will be familiar to Django developers. Visit
|
||||
[Django's documentation](https://docs.djangoproject.com/en/2.2/#index-first-steps)
|
||||
[Django's documentation](https://docs.djangoproject.com/en/3.2/#index-first-steps)
|
||||
for more information about how Django projects are typically
|
||||
organized. And finally, the
|
||||
[message sending](../subsystems/sending-messages.md) documentation on
|
||||
|
@ -240,7 +240,7 @@ Create the migration file using the Django `makemigrations` command:
|
|||
(NNNN is a number that is equal to the number of migrations.)
|
||||
|
||||
If you run into problems, the
|
||||
[Django migration documentation](https://docs.djangoproject.com/en/1.8/topics/migrations/)
|
||||
[Django migration documentation](https://docs.djangoproject.com/en/3.2/topics/migrations/)
|
||||
is helpful.
|
||||
|
||||
### Test your migration changes
|
||||
|
|
|
@ -35,7 +35,7 @@ or JSON (data for Zulip clients on all platforms, custom bots, and
|
|||
integrations).
|
||||
|
||||
The format of the URL patterns in Django is [documented
|
||||
here](https://docs.djangoproject.com/en/1.8/topics/http/urls/), and
|
||||
here](https://docs.djangoproject.com/en/3.2/topics/http/urls/), and
|
||||
the Zulip specific details for these are discussed in detail in the
|
||||
[life of a request doc](life-of-a-request.html#options).
|
||||
|
||||
|
@ -93,7 +93,7 @@ specific to Zulip.
|
|||
def home(request: HttpRequest) -> HttpResponse:
|
||||
```
|
||||
|
||||
[login-required-link]: https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.decorators.login_required
|
||||
[login-required-link]: https://docs.djangoproject.com/en/3.2/topics/auth/default/#django.contrib.auth.decorators.login_required
|
||||
|
||||
### Writing a template
|
||||
|
||||
|
|
Loading…
Reference in New Issue