Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

from django.urls import re_path

from django.urls import re_path

urlpatterns = [
    re_path(r'^blog/(page-(d+)/)?$', blog_articles),                  # bad
    re_path(r'^comments/(?:page-(?P<page_number>d+)/)?$', comments),  # good
]
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #import
ADD COMMENT
Topic
Name
7+2 =