demo/demoproject/storage/urls.py
raw| 1 | from django.urls import re_path |
| 2 | |
| 3 | from demoproject.storage import views |
| 4 | |
| 5 | app_name = "storage" |
| 6 | urlpatterns = [ |
| 7 | re_path( |
| 8 | r"^static-path/(?P<path>[a-zA-Z0-9_-]+\.[a-zA-Z0-9]{1,4})$", |
| 9 | views.static_path, |
| 10 | name="static_path", |
| 11 | ), |
| 12 | re_path( |
| 13 | r"^dynamic-path/(?P<path>[a-zA-Z0-9_-]+\.[a-zA-Z0-9]{1,4})$", |
| 14 | views.dynamic_path, |
| 15 | name="dynamic_path", |
| 16 | ), |
| 17 | ] |