Passing variable from django template to view

前端 未结 3 757
耶瑟儿~
耶瑟儿~ 2020-12-07 23:26

I\'m building my first site with django 1.7 and am having a hard time figuring out how to pass a variable from a click to a view. My GET is also empty.

My template h

3条回答
  •  无人及你
    2020-12-07 23:54

    We also use like this:

    from django.urls import path
    from . import views
    
    urlpatterns = [
           path('articles/2003/', views.special_case_2003),
           path('articles//', views.year_archive),
           path('articles///', views.month_archive),
           path('articles////', views.article_detail),
    ]
    

提交回复
热议问题