2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from app.views import (IndexView, UserCreateView, ProfileView, PostCreateView, PostDetailCommentCreateView, PostUpdateView, PostDeleteView, CommentUpdateView) urlpatterns = [ url(r'^admin/', admin.site.urls), url('^', include('django.contrib.auth.urls')), url(r'^create_user/$', UserCreateView.as_view(), name="user_create_view"), url(r'^$', IndexView.as_view(), name="index_view"), url(r'^accounts/profile/$', ProfileView.as_view(), name="profile_view"), url(r'^post/create/$', PostCreateView.as_view(), name="post_create_view"), url(r'^post/(?P<pk>\d+)/$', PostDetailCommentCreateView.as_view(), name="post_detail_comment_create_view"), url(r'^post/(?P<pk>\d+)/update/$', PostUpdateView.as_view(), name="post_update_view"), url(r'^post/(?P<pk>\d+)/delete/$', PostDeleteView.as_view(), name="post_delete_view"), url(r'^comment/(?P<pk>\d+)/update/$', CommentUpdateView.as_view(), name="comment_update_view") ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import patterns, include, url from app.views import HomeView, ProfileView from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', HomeView.as_view(), name='home'), url(r'^profile/', ProfileView.as_view(), name='profile'), url(r'^login/', 'django.contrib.auth.views.login', {'template_name': 'auth/login.html'}), url(r'^logout/', 'django.contrib.auth.views.logout'), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), )
from django.contrib import admin from django.urls import path, include from app.views import RegisterView, LoginView, GuestView, StatusView, ProfileView from rest_framework.authtoken import views urlpatterns = [ path('register/', RegisterView.as_view()), path('login/', LoginView.as_view()), path('guests/', GuestView.as_view()), path('all-status/', StatusView.as_view()), path('profile/', ProfileView.as_view()) ]
from django.conf.urls.i18n import i18n_patterns from django.utils.translation import ugettext_lazy as _ from djangoPress import settings urlpatterns = [ path('admin/', admin.site.urls), url( r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, ), url(r'login', LoginView.as_view(), name="login"), url(r'register', RegisterView.as_view(), name="register"), url(r'logout', auth_views.logout, {'next_page': '/'}, name='logout') ] urlpatterns += i18n_patterns( url(_(r'profile/(?P<pk>\w+)'), ProfileView.as_view(), name='profile'), url(_(r'search$'), SearchView.as_view(), name='search'), url(_(r'create$'), ArticleCreation.as_view(), name="createArticle"), url(_(r'update/(?P<pk>\d+)'), ArticleUpdate.as_view(), name="updateArticle"), url(_(r'delete/(?P<pk>\d+)'), ArticleDelete.as_view(), name="deleteArticle"), url(_(r'^$'), IndexView.as_view(), name="index"), url(_(r'(?P<pk>\d+)'), ArticleDetails.as_view(), name="article"), )
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.auth.views import login, logout from app.views import IndexView, ProfileView, SignUpView, MenuView, CreateOrderView, OrderListView, OrderDetailView, KitchenOrderView, MenuItemView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name="index_view"), url(r'^signup/', SignUpView.as_view(), name="sign_up_view"), url(r'^accounts/profile/$', ProfileView.as_view(), name="profile_view"), url(r'^profiles/(?P<pk>\d+)$', ProfileView.as_view(), name="profile_view"), url(r'^menu/$', MenuItemView.as_view(), name="menu_item_view"), url(r'^login/$', login, name="login_view"), url(r'^logout/$', logout, name="logout_view"), url(r'^order/$', CreateOrderView.as_view(), name="create_order_view"), url(r'^orders/$', OrderListView.as_view(), name="order_list_view"), url(r'^orders/(?P<pk>\d+)$', OrderDetailView.as_view(), name="order_detail_view"), url(r'^kitchen/$', KitchenOrderView.as_view(), name="kitchen_order_view") #url(r'^menu_item/$',MenuItemView.as_view(), name='menu_item_view') ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from django.urls import path from app import views from app.models.person import Person from app.views import IndexView, RegisterView, PersonSearchView, PersonSearchTagView, LoginView, ProfileView, \ LogoutView, ProfilSearchView # from core import views as core_views urlpatterns = [ path('admin/', admin.site.urls), url(r'^$', PersonSearchView.as_view(), name='app_index'), url(r'register/$', views.signup, name='app_register_view'), url(r'logout/$', LogoutView.as_view(), name='app_register_view'), url('profil/view', ProfileView.as_view(), name='app_profile_view'), path('profil/tag/<int:pk>', ProfilSearchView.as_view(), name='app_profile_search_tag'), url(r'login/$', LoginView.as_view(), name='app_login_view'), path('person/tag/<int:pk>', PersonSearchTagView.as_view(), name='app_cocktail_search_tag') ]
)), name='registration_done' ), url( r'^view/myprofile/$', login_required(MyProfileView.as_view()), name='view_my_profile' ), url( r'^edit/myprofile/$', login_required(MyProfileEdit.as_view()), name='edit_my_profile' ), url( r'^accounts/profile/$', login_required(ProfileView.as_view()), name='profile' ), url( r'^public/profile/(?P<user_id>\d+)/$', PublicProfileView.as_view(), name='public_profile' ), url( r'^public/usercomments/(?P<user_id>\d+)/$', UserCommentsView.as_view(), name='public_user_comments' ), url( r'^profile/duedate/$',
from django.conf.urls import url, include from django.contrib import admin from rest_framework.authtoken import views from django.views.generic import TemplateView from app.views import TransactionListCreateAPIView, ProfileView, TransactionCreateView, UserCreateView, \ IndexView, TransactionRetrieveAPIView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^obtain-token/$', views.obtain_auth_token), url(r'^$', IndexView.as_view(), name="index_view"), url(r'^profile/(?P<pk>\d+)$', ProfileView.as_view(), name="profile_view"), url(r'^profile/(?P<pk>\d+)/create/$', TransactionCreateView.as_view(), name="transaction_create_view"), url(r'^api/transactions/$', TransactionListCreateAPIView.as_view(), name="transaction_list_api_view" ), url(r'^api/transactions/(?P<pk>\d+)/$', TransactionRetrieveAPIView.as_view(), name="transactions_retrieve_api_view"), url(r'^create_user/$', UserCreateView.as_view(), name="user_create_view"), ]
1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from app.views import BookmarkView, BookmarkCreateView, redirect_view, UserCreateView, \ BookmarkUpdateView, BookmarkDeleteView, ProfileView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^$', BookmarkView.as_view(), name="bookmark_view"), url(r'^profile/$', ProfileView.as_view(), name="profile_view"), url(r'^bookmarks/create_user/$', UserCreateView.as_view(), name="user_create_view"), url(r'^profile/create/$', BookmarkCreateView.as_view(), name="bookmark_create_view"), url(r'^profile/update/(?P<pk>\d+)/$', BookmarkUpdateView.as_view(), name="bookmark_update_view"), url(r'^profile/delete/(?P<pk>\d+)/$', BookmarkDeleteView.as_view(), name="bookmark_delete_view"), url(r'^bookmarks/(?P<short_url>\w+)/$', redirect_view, name="redirect_view"),
from django.urls import path from app.views import ProfileView, EditView, CandidateListView app_name = 'app' urlpatterns = [ path('', ProfileView.as_view()), path('profile/', ProfileView.as_view(), name='profile'), path('profile/edit', EditView.as_view(), name='edit'), path('list/', CandidateListView.as_view(), name='list'), ]
url(r'^stories/(?P<slug>[\w-]+)/$', StoryView.as_view(), name="story"), url(r'^stories/(?P<slug>[\w-]+)/comment/$', StoriesCommentView.as_view(), name='story comment'), url(r'^articles/$', ArticlesView.as_view(), name="articles"), url(r'^articles/article_archive/$', ArticleArchiveView.as_view(), name="article-archive"), url(r'^articles/(?P<slug>[\w-]+)/$', ArticleView.as_view(), name="article"), url(r'^articles/(?P<slug>[\w-]+)/comment/$', ArticlesCommentView.as_view(), name='article comment'), url(r'^media/library/', include('library.urls')), url(r'^library/', include('library.urls')), url(r'^media/actual_play/', include('actual_play.urls')), url(r'^actual_play/', include('actual_play.urls')), url(r'^members/', include('django.contrib.auth.urls')), url(r'^markdown/', include('django_markdown.urls')), url(r'^accounts/', include('registration.backends.hmac.urls')), url(r'^accounts/profile/(?P<slug>[\-\w]+)/$', ProfileView.as_view(), name='update_user'), url(r'^search/(?P<q>.*)$', SearchView.as_view(), name='search'), ] if settings.DEBUG: urlpatterns += patterns('', (r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT })) if settings.DEBUG: from django.conf.urls.static import static urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)