Pull object names from model definitions in CRUD views
This commit is contained in:
@@ -106,10 +106,6 @@ class HookList(LoginRequiredMixin, ObjectList):
|
||||
# window_content = "window-content/hooks.html"
|
||||
list_template = "partials/hook-list.html"
|
||||
model = Hook
|
||||
context_object_name = "hooks"
|
||||
context_object_name_singular = "hook"
|
||||
title = "Hooks"
|
||||
title_singular = "Hook"
|
||||
page_title = "List of active URL endpoints for receiving hooks."
|
||||
page_subtitle = (
|
||||
"Add URLs here to receive Drakdoo callbacks. "
|
||||
@@ -125,8 +121,6 @@ class HookList(LoginRequiredMixin, ObjectList):
|
||||
class HookCreate(LoginRequiredMixin, ObjectCreate):
|
||||
model = Hook
|
||||
form_class = HookForm
|
||||
context_object_name = "hooks"
|
||||
context_object_name_singular = "hook"
|
||||
|
||||
list_url_name = "hooks"
|
||||
list_url_args = ["type"]
|
||||
@@ -137,8 +131,6 @@ class HookCreate(LoginRequiredMixin, ObjectCreate):
|
||||
class HookUpdate(LoginRequiredMixin, ObjectUpdate):
|
||||
model = Hook
|
||||
form_class = HookForm
|
||||
context_object_name = "hooks"
|
||||
context_object_name_singular = "hook"
|
||||
|
||||
list_url_name = "hooks"
|
||||
list_url_args = ["type"]
|
||||
@@ -148,8 +140,6 @@ class HookUpdate(LoginRequiredMixin, ObjectUpdate):
|
||||
|
||||
class HookDelete(LoginRequiredMixin, ObjectDelete):
|
||||
model = Hook
|
||||
context_object_name = "hooks"
|
||||
context_object_name_singular = "hook"
|
||||
|
||||
list_url_name = "hooks"
|
||||
list_url_args = ["type"]
|
||||
|
||||
Reference in New Issue
Block a user