from django.conf.urls.static import static from django.conf import settings from mysite.views import UserCreationView, UserCreationDoneTV urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^accounts/register/$', UserCreationView.as_view(), name='register'), url(r'^accounts/register/done/$', UserCreationDoneTV.as_view(), name='register_done'), url(r'^$', IndexView.as_view(), name='index'), url(r'^bookmark/$', BookmarkLV.as_view(), name='bookmark_index'), url(r'^bookmark/(?P<pk>\d+)$', BookmarkDV.as_view(), name='detail'), url(r'^blog/$', PostLV.as_view(), name='blog_index'), url(r'^blog/(?P<pk>\d+)$', PostDV.as_view(), name='blog_detail'), url(r'^blog/add/$', PostCreateView.as_view(), name="blog_add"), url(r'^blog/(?P<pk>[0-9]+)/delete/$', PostDeleteView.as_view(), name="blog_delete"), url(r'^blog/(?P<pk>[0-9]+)/update/$', PostUpdateView.as_view(), name="blog_update"), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) """ r'^ => localhost:8000/ r'^admin ====> localhost:8000/admin r'^bookmark/$' =====> localhost:8000/bookmark """
from django.urls import path from blog.views import PostLV, PostDV, PostAV, PostYAV, PostMAV, PostDAV, PostTAV app_name = 'blog' urlpatterns = [ path('', PostLV.as_view(), name='index'), path('post/', PostLV.as_view(), name='post_list'), path('post/<str:slug>/', PostDV.as_view(), name='post_detail'), path('archive/', PostAV.as_view(), name='post_archive'), path('<int:year>/', PostYAV.as_view(), name='post_year_archive'), path('<int:year>/<str:month>/', PostMAV.as_view(), name='post_month_archive'), path('<int:year>/<str:month>/<int:day>/', PostDAV.as_view(), name='post_day_archive'), path('today/', PostTAV.as_view(), name='post_today_archive'), ]
from django.conf.urls import url,include from django.contrib import admin from mysite.views import IndexView,UserCreateView,UserCreateDoneTV from bookmark.views import BookmarkLV, BookmarkDV from blog.views import PostLV,PostDV from django.conf.urls.static import static from django.conf import settings urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name='index'), url(r'^bookmark/$', BookmarkLV.as_view(), name='bookmark_index'), url(r'^bookmark/(?P<pk>\d+)/$', BookmarkDV.as_view(),name="detail"), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^accounts/register/$', UserCreateView.as_view(), name='register'), url(r'^accounts/register/done/$',UserCreateDoneTV.as_view(),name='register_done'), url(r'^blog/$', PostLV.as_view(), name="blog_index"), url(r'^blog/(?P<pk>\d+)/$', PostDV.as_view(), name = "blog_detail"), ] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
from django.conf.urls import url from blog.views import PostLV, PostDV, PostAV, PostYAV, PostMAV, PostDAV, PostTAV, TagTV, PostTOL, SearchFormView app_name = 'blog' urlpatterns = [ url(r'^today/$', PostTAV.as_view(), name='post_today_archive'), url(r'^tag/$', TagTV.as_view(), name='tag_cloud'), url(r'^tag/(?P<tag>[^/]+(?u))/$', PostTOL.as_view(), name='tagged_object_list'), url(r'^$', PostLV.as_view(), name='index'), # "blog:index" url(r'^post/$', PostLV.as_view(), name='post_list'), url(r'^post/(?P<slug>[-\w]+)/$', PostDV.as_view(), name='post_detail'), url(r'^archive/$', PostAV.as_view(), name='post_archive'), url(r'^(?P<year>\d{4})/$', PostYAV.as_view(), name='post_year_archive'), url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', PostMAV.as_view(), name='post_month_archive'), url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$', PostDAV.as_view(), name='post_day_archive'), url(r'^search/$', SearchFormView.as_view(), name='search'), ]
from django.conf import settings urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name='index'), #정규식, 얘들이 정규식을 읽고 필요한 파일을 불러옴. url(r'^django$', DjangoView.as_view(), name='djangoIndex'), url(r'^accounts/register/$', UserCreateView.as_view(), name='register'), url(r'^accounts/register_done/$', UserCreateDoneTV.as_view(), name='register_done'), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^bookmark/$', BookmarkLV.as_view(), name='bookmark_index'), url(r'^bookmark/(?P<pk>\d+)/$', BookmarkDV.as_view(), name='detail'), url(r'^bookmark/add/$', BookmarkCV.as_view(), name='bookmark_create'), url(r'^bookmark/update/(?P<pk>[0-9]+)$', BookmarkUV.as_view(), name='bookmark_update'), url(r'^bookmark/delete/(?P<pk>[0-9]+)$', BookmarkRV.as_view(), name='bookmark_delete'), url(r'^youtube$', BookmarkLV.as_view(), name='youtube_index'), url(r'^youtube/(?P<pk>\d+)/$', YoutubeDV.as_view(), name='youtube_detail'), url(r'^blog/$', PostLV.as_view(), name='blog_index'), url(r'^blog/(?P<pk>\d+)/$', PostDV.as_view(), name='blog_detail'), #<pk> = primary_key url(r'^blog/add$', PostCV.as_view(), name='blog_create'), url(r'^blog/update/(?P<pk>[0-9]+)$', PostUV.as_view(), name='blog_update'), url(r'^blog/delete/(?P<pk>[0-9]+)$', PostRV.as_view(), name='blog_delete'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import url from blog.models import Post from blog.views import PostLV, PostDV from django.views.generic import ListView, DetailView urlpatterns = [ url(r'^$', PostLV.as_view(), name='index'), url(r'^post/$', PostLV.as_view(), name='post_list'), url(r'^post/(?P<pk>\d+)/$', PostDV.as_view(), name='post_detail'), ]
""" from django.contrib import admin from django.urls import path, include from MY_HOME.views import IndexView, AboutView, UserCreateView, UserCreateDoneTV, CreateView from bookmark.views import BookmarkDV, BookmarkLV, BookmarkCV, BookmarkUV, BookmarkRV from blog.views import PostLV, PostCV, PostDV, PostUV from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view(), name='index'), path('bookmark/', BookmarkLV.as_view(), name='bookmark_index'), path('bookmark/delete/<pk>', BookmarkRV.as_view(), name='bookmark_delete'), path('bookmark/update/<pk>', BookmarkUV.as_view(), name="bookmark_update"), path('bookmark/create', BookmarkCV.as_view(), name='bookmark_create'), path('bookmark/<pk>', BookmarkDV.as_view(), name='bookmark_detail'), path('accounts/register/', UserCreateView.as_view(), name='register'), path('about/', AboutView.as_view(), name="about"), path('accounts/', include('django.contrib.auth.urls')), path('accounts/register/', UserCreateView.as_view(), name='register'), path('accounts/register/done/', UserCreateDoneTV.as_view(), name='register_done'), path('blog/', PostLV.as_view(), name="blog"), path('blog/create', PostCV.as_view(), name="blog_create"), path('blog/update/<pk>', PostUV.as_view(), name="blog_update"), path('blog/delete/<pk>', PostDV.as_view(), name="blog_delete"), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path, re_path from blog.views import PostLV, PostDV, PostAV, PostYAV, PostMAV, PostDAV, PostTAV from blog.views import PostCreateView, PostChangeLV, PostDeleteView, PostUpdateView app_name = 'blog' urlpatterns = [ path('', PostLV.as_view(), name="index"), # path('<int:pk>/') # Example : /blog/post/this-is-title/ re_path(r'^post/(?P<slug>[-\w]+)/$', PostDV.as_view(), name="post_detail"), # Example : /blog/archive/ path('archive/', PostAV.as_view(), name='post_archive'), # Example: /blog/archive/2019/ path('archive/<int:year>/', PostYAV.as_view(), name='post_year_archive'), # Example: /blog/archive/2019/12/ path('archive/<int:year>/<int:month>/', PostMAV.as_view(), name='post_month_archive'), # Example: /blog/archive/2019/12/17/ path('archive/<int:year>/<int:month>/<int:day>/', PostDAV.as_view(), name='post_day_archive'), # Example: /blog/archive/today/