Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Use modern django URL patterns in examples.

Vishnu KS138a0cb073b8
diff --git a/docs/subsystems/html-css.md b/docs/subsystems/html-css.md
index f47c8df2d31..ee7d8d7ccfb 100644
--- a/docs/subsystems/html-css.md
+++ b/docs/subsystems/html-css.md
@@ -102,7 +102,7 @@ The next line in the code being the context definition.
using `TemplateView`, for example:
```
-url(r'^config-error/google$', TemplateView.as_view(
+path('config-error/google', TemplateView.as_view(
template_name='zerver/config_error.html',),
{'google_error': True},),
```
diff --git a/docs/tutorials/life-of-a-request.md b/docs/tutorials/life-of-a-request.md
index d2e08a569fb..118f5077bac 100644
--- a/docs/tutorials/life-of-a-request.md
+++ b/docs/tutorials/life-of-a-request.md
@@ -140,7 +140,7 @@ yields a response with this HTTP header:
We can see this reflected in [zproject/urls.py](https://github.com/zulip/zulip/blob/master/zproject/urls.py):
- url(r'^users$', 'zerver.lib.rest.rest_dispatch',
+ path('users', 'zerver.lib.rest.rest_dispatch',
{'GET': 'zerver.views.users.get_members_backend',
'PUT': 'zerver.views.users.create_user_backend'}),
diff --git a/docs/tutorials/writing-views.md b/docs/tutorials/writing-views.md
index a864a2eecee..7a67bf0be4c 100644
--- a/docs/tutorials/writing-views.md
+++ b/docs/tutorials/writing-views.md
@@ -50,8 +50,8 @@ to `i18n_urls` in `zproject/urls.py`
```diff
i18n_urls = [
...
-+ url(r'^quote-of-the-day/$', TemplateView.as_view(template_name='zerver/qotd.html')),
-+ url(r'^postcards/$', 'zerver.views.postcards'),
++ path('quote-of-the-day', TemplateView.as_view(template_name='zerver/qotd.html')),
++ path('postcards', 'zerver.views.postcards'),
]
```