Add CRUD for Drug
This commit is contained in:
23
app/urls.py
23
app/urls.py
@@ -20,7 +20,7 @@ from django.contrib.auth.views import LogoutView
|
||||
from django.urls import include, path
|
||||
from two_factor.urls import urlpatterns as tf_urls
|
||||
|
||||
from core.views import base, demo, notifications
|
||||
from core.views import base, demo, drugs, notifications
|
||||
|
||||
urlpatterns = [
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
@@ -40,4 +40,25 @@ urlpatterns = [
|
||||
notifications.NotificationsUpdate.as_view(),
|
||||
name="notifications_update",
|
||||
),
|
||||
path("drugs/<str:type>/", drugs.DrugList.as_view(), name="drugs"),
|
||||
path(
|
||||
"drugs/<str:type>/create/",
|
||||
drugs.DrugCreate.as_view(),
|
||||
name="drug_create",
|
||||
),
|
||||
path(
|
||||
"drugs/<str:type>/update/<str:pk>/",
|
||||
drugs.DrugUpdate.as_view(),
|
||||
name="drug_update",
|
||||
),
|
||||
path(
|
||||
"drugs/<str:type>/delete/<str:pk>/",
|
||||
drugs.DrugDelete.as_view(),
|
||||
name="drug_delete",
|
||||
),
|
||||
path(
|
||||
"drugs/clear/all/",
|
||||
drugs.DrugClear.as_view(),
|
||||
name="drug_clear",
|
||||
),
|
||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user