kopia lustrzana https://github.com/wagtail/wagtail
Allow subclasses of CreateView/EditView to omit template_name
rodzic
8edfcc168f
commit
06f793a355
|
@ -58,6 +58,8 @@ class IndexView(PermissionCheckedMixin, View):
|
||||||
|
|
||||||
|
|
||||||
class CreateView(PermissionCheckedMixin, View):
|
class CreateView(PermissionCheckedMixin, View):
|
||||||
|
template_name = 'wagtailadmin/generic/create.html'
|
||||||
|
|
||||||
def get_add_url(self):
|
def get_add_url(self):
|
||||||
return reverse(self.add_url_name)
|
return reverse(self.add_url_name)
|
||||||
|
|
||||||
|
@ -87,6 +89,7 @@ class CreateView(PermissionCheckedMixin, View):
|
||||||
class EditView(PermissionCheckedMixin, View):
|
class EditView(PermissionCheckedMixin, View):
|
||||||
page_title = __("Editing")
|
page_title = __("Editing")
|
||||||
context_object_name = None
|
context_object_name = None
|
||||||
|
template_name = 'wagtailadmin/generic/edit.html'
|
||||||
|
|
||||||
def get_page_subtitle(self):
|
def get_page_subtitle(self):
|
||||||
return str(self.instance)
|
return str(self.instance)
|
||||||
|
|
Ładowanie…
Reference in New Issue