Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dynamic id python

# URLconf
from django.urls import path

from . import views

urlpatterns = [
    path('blog/', views.page),
    path('blog/page<int:num>/', views.page),
]

# View (in blog/views.py)
def page(request, num=1):
    # Output the appropriate page of blog entries, according to num.
    ...
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #dynamic #id #python
ADD COMMENT
Topic
Name
5+1 =