dev_urls: Give the user_avatars URLPattern a name.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-09-11 21:32:57 -07:00
committed by Tim Abbott
parent 1c80188648
commit b41165fd01
2 changed files with 9 additions and 20 deletions

View File

@@ -84,7 +84,9 @@ i18n_urls = [
# On a production instance, these files would be served by nginx.
if settings.LOCAL_UPLOADS_DIR is not None:
urls += [
re_path(r'^user_avatars/(?P<path>.*)$', serve,
{'document_root': os.path.join(settings.LOCAL_UPLOADS_DIR, "avatars")}),
]
avatars_url = re_path(
r'^user_avatars/(?P<path>.*)$',
serve,
{'document_root': os.path.join(settings.LOCAL_UPLOADS_DIR, "avatars")},
)
urls += [avatars_url]