Fix documents app view tests. Update code to match code style. PEP8 fixes.
This commit is contained in:
@@ -385,6 +385,21 @@ class DocumentTypeListView(SingleObjectListView):
|
||||
}
|
||||
|
||||
|
||||
class DocumentTypeCreateView(SingleObjectCreateView):
|
||||
fields = (
|
||||
'label', 'trash_time_period', 'trash_time_unit', 'delete_time_period',
|
||||
'delete_time_unit'
|
||||
)
|
||||
model = DocumentType
|
||||
post_action_redirect = reverse_lazy('documents:document_type_list')
|
||||
view_permission = permission_document_type_create
|
||||
|
||||
def get_extra_context(self):
|
||||
return {
|
||||
'title': _('Create document type'),
|
||||
}
|
||||
|
||||
|
||||
class DocumentTypeDeleteView(SingleObjectDeleteView):
|
||||
model = DocumentType
|
||||
post_action_redirect = reverse_lazy('documents:document_type_list')
|
||||
@@ -414,21 +429,6 @@ class DocumentTypeEditView(SingleObjectEditView):
|
||||
}
|
||||
|
||||
|
||||
class DocumentTypeCreateView(SingleObjectCreateView):
|
||||
fields = (
|
||||
'label', 'trash_time_period', 'trash_time_unit', 'delete_time_period',
|
||||
'delete_time_unit'
|
||||
)
|
||||
model = DocumentType
|
||||
post_action_redirect = reverse_lazy('documents:document_type_list')
|
||||
view_permission = permission_document_type_create
|
||||
|
||||
def get_extra_context(self):
|
||||
return {
|
||||
'title': _('Create document type'),
|
||||
}
|
||||
|
||||
|
||||
class DocumentTypeFilenameListView(SingleObjectListView):
|
||||
model = DocumentType
|
||||
view_permission = permission_document_type_view
|
||||
|
||||
Reference in New Issue
Block a user