add view for delete file_datas register
This commit is contained in:
parent
fd27e82203
commit
489c91560e
|
@ -1078,3 +1078,16 @@ class ImportAddView(NotifyActivateUserByEmail, ImportExport, FormView):
|
||||||
messages.error(self.request, e.message)
|
messages.error(self.request, e.message)
|
||||||
|
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
|
class ImportDeleteView(AdminView):
|
||||||
|
model = PeopleView
|
||||||
|
|
||||||
|
def get(self, request, *args, **kwargs):
|
||||||
|
self.check_valid_user()
|
||||||
|
self.pk = kwargs['pk']
|
||||||
|
self.object = get_object_or_404(self.model, pk=self.pk)
|
||||||
|
self.object.delete()
|
||||||
|
|
||||||
|
return redirect('idhub:admin_import')
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,8 @@ urlpatterns = [
|
||||||
name='admin_terms_and_conditions'),
|
name='admin_terms_and_conditions'),
|
||||||
path('admin/import/new', views_admin.ImportAddView.as_view(),
|
path('admin/import/new', views_admin.ImportAddView.as_view(),
|
||||||
name='admin_import_add'),
|
name='admin_import_add'),
|
||||||
|
path('admin/import/<int:pk>/del', views_admin.ImportDeleteView.as_view(),
|
||||||
|
name='admin_import_del'),
|
||||||
path('admin/enc/', views_admin.EncryptionKeyView.as_view(), name='encryption_key'),
|
path('admin/enc/', views_admin.EncryptionKeyView.as_view(), name='encryption_key'),
|
||||||
path('admin/auth/<uuid:admin2fauth>', views_admin.DobleFactorAuthView.as_view(),
|
path('admin/auth/<uuid:admin2fauth>', views_admin.DobleFactorAuthView.as_view(),
|
||||||
name='admin_2fauth'),
|
name='admin_2fauth'),
|
||||||
|
|
Loading…
Reference in New Issue