Last active
August 8, 2019 15:31
-
-
Save gmocamilotd/d949d08ccfa5e314a5666510c4eed679 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# antiguo | |
from django.conf.urls import url | |
url(r'^login/$', views.user_login, name='login'), | |
url(r'^detail/(?P<id>\d+)/(?P<slug>[-\w]+)/$',views.image_detail, name='detail'), | |
url(r'^users/(?P<username>[-\w]+)/$', views.user_detail, name='user_detail'), | |
# nuevo | |
from django.urls import path | |
path('login/', views.user_login, name='login') | |
------------------- | |
urlpatterns = [ | |
path('articles/2003/', views.special_case_2003), | |
path('articles/<int:year>/', views.year_archive), | |
path('articles/<int:year>/<int:month>/', views.month_archive), | |
path('articles/<int:year>/<int:month>/<slug:slug>/', views.article_detail), | |
path('articles/<slug:title>/', views.article, name='article-detail'), | |
path('articles/<slug:title>/<int:section>/', views.section, name='article-section'), | |
path('users/<username>/', views.user_detail, name='user_detail') | |
path('weblog/', include('blog.urls')), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment