-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
25 lines (17 loc) · 899 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django.conf.urls import url
from django.urls import path, include
from . import views
app_name = "announcements"
urlpatterns = [
path("create", views.CreateAnnouncementView.as_view(), name="create"),
path("course", views.AnnouncementListView.as_view(), name='announcement-list'),
path("", views.AllAnnouncements.as_view(), name='all-announcements'),
path("detail/<int:pk>", views.AnnouncementDetail.as_view(), name='announcement-detail'),
path("delete/<int:pk>", views.DeleteAnnouncement.as_view(), name='delete'),
path("about.html", views.about, name="about"),
path("indexdocs.html", views.indexdocs, name="indexdocs"),
# _____________ Courses URLs__________________#
url(r'^api/announcement$', views.Announcement_list),
url(r'^api/announcement/(?P<pk>[0-9]+)$', views.Announcement_detail),
url(r'^api/announcement/published$', views.Announcement_list_active),
]