from django.conf.urls import url from announcements.views import detail, dismiss from announcements.views import CreateAnnouncementView, UpdateAnnouncementView from announcements.views import DeleteAnnouncementView, AnnouncementListView urlpatterns = [ # "", url(r"^$", AnnouncementListView.as_view(), name="announcements_list"), url(r"^announcement/create/$", CreateAnnouncementView.as_view(), name="announcements_create"), url(r"^announcement/(?P<pk>\d+)/$", detail, name="announcements_detail"), url(r"^announcement/(?P<pk>\d+)/hide/$", dismiss, name="announcements_dismiss"), url(r"^announcement/(?P<pk>\d+)/update/$", UpdateAnnouncementView.as_view(), name="announcements_update"), url(r"^announcement/(?P<pk>\d+)/delete/$", DeleteAnnouncementView.as_view(), name="announcements_delete"), ]
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 announcements.views import AnnouncementListView from django.conf.urls import url, include from django.contrib import admin import challenges.views as challenge_views import teams.views as team_views urlpatterns = [ url('', include('django.contrib.auth.urls')), url(r'^$', AnnouncementListView.as_view(), name='announcements'), url(r'^admin/', admin.site.urls), url(r'^categories/$', challenge_views.CategoryListView.as_view(), name='categories'), url(r'^category/(?P<slug>[-\w]+)/$', challenge_views.CategoryDetailView.as_view(), name='category'), url(r'^challenge/(?P<slug>[-\w]+)/$', challenge_views.ChallengeDetailView.as_view(), name='challenge'), url(r'^challenges/$', challenge_views.ChallengeListView.as_view(), name='challenges'), url(r'^level/(?P<pk>\d{1,32})/$', challenge_views.LevelDetailView.as_view(),
from django.conf.urls import url from announcements.views import (AnnouncementCreateView, AnnouncementListView, AnnouncementUserListView, ApplyAnnouncementsReceivedUser, AnnouncementApplyCreate, resolve_apply, AnnouncementDetailsView, EditAnnouncementView, StopAnnouncementCreateView, StopAnnouncementUpdateView, ApplyAnnouncementsPerformedUser, AnnouncementApplyDelete, AnnouncementUserRecommendationsListView, CommentAnnouncementCreateView) urlpatterns = [ url(r'^create$', AnnouncementCreateView.as_view(), name='create-announcement'), url(r'^all', AnnouncementListView.as_view(), name='announcement-all'), url(r'^user', AnnouncementUserListView.as_view(), name='announcement-user'), url(r'^apply/received$', ApplyAnnouncementsReceivedUser.as_view(), name='apply-announcement-user-received'), url(r'^apply/performed$', ApplyAnnouncementsPerformedUser.as_view(), name='apply-announcement-user-performed'), url(r'^apply/(?P<pk>[-\w]+)$', AnnouncementApplyCreate.as_view(), name='create-apply-announcement'), url(r'^apply/remove/(?P<pk>[-\w]+)$', AnnouncementApplyDelete.as_view(), name='remove-apply-announcement'), url(r'^apply/resolve/(?P<pk>[-\w]+)/(?P<action>[-\w]+)$', resolve_apply, name='resolve-apply-announcement'), url(r'^details/(?P<pk>[-\w]+)$', AnnouncementDetailsView.as_view(), name='details-announcement'), url(r'^edit/(?P<pk>[-\w]+)$', EditAnnouncementView.as_view(), name='edit-announcement'), url(r'^stop/create/(?P<pk>[-\w]+)$', StopAnnouncementCreateView.as_view(), name='stop-announcement-create'), url(r'^stop/edit/(?P<pk>[-\w]+)$', StopAnnouncementUpdateView.as_view(), name='stop-announcement-edit'), url(r'^recommendations$', AnnouncementUserRecommendationsListView.as_view(), name='recommendations-announcements'), url(r'^comment/create/(?P<announcement_pk>[-\w]+)$', CommentAnnouncementCreateView.as_view(), name='create-comment-announcement'), ]
from django.conf.urls.defaults import * from announcements.views import detail, dismiss from announcements.views import CreateAnnouncementView, UpdateAnnouncementView from announcements.views import DeleteAnnouncementView, AnnouncementListView urlpatterns = patterns("", url(r"^$", AnnouncementListView.as_view(), name="announcements_list"), url(r"^announcement/create/$", CreateAnnouncementView.as_view(), name="announcements_create"), url(r"^announcement/(?P<pk>\d+)/$", detail, name="announcements_detail"), url(r"^announcement/(?P<pk>\d+)/hide/$", dismiss, name="announcements_dismiss"), url(r"^announcement/(?P<pk>\d+)/update/$", UpdateAnnouncementView.as_view(), name="announcements_update"), url(r"^announcement/(?P<pk>\d+)/delete/$", DeleteAnnouncementView.as_view(), name="announcements_delete"), )
from django.urls import path from announcements.views import AnnouncementCreateView, AnnouncementListView, AnnouncementDetailView, \ AnnouncementUpdateView, AnnouncementDeleteView, MyAnnouncementListView from users.views import LoginView, RegisterView, ChangePassword, UserProfileView #logout_view from django.conf.urls.static import static from django.conf import settings from django.contrib.auth import views as auth_views urlpatterns = [ path('', AnnouncementListView.as_view(), name='announcement-home'), path('announcements/annouc-<int:pk>/', AnnouncementDetailView.as_view(), name='announcement-detail'), path('announcements/annouc-<int:pk>/update/', AnnouncementUpdateView.as_view(), name='announcement-update'), path('announcements/annouc-<int:pk>/delete/', AnnouncementDeleteView.as_view(), name='announcement-delete'), path('announcements/new/', AnnouncementCreateView.as_view(), name='announcement-create'), path('users/<int:pk>/', UserProfileView.as_view(), name='user-profile'), path('users/my_announcements/', MyAnnouncementListView.as_view(), name='my-announcements'), path('login/', LoginView.as_view(), name="login"), path("logout/", auth_views.LogoutView.as_view(template_name='portal_v1/logout.html'), name="logout"), path("register/", RegisterView.as_view(), name="register"),