mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-11 21:26:02 +00:00
Add picture-people relation and ask for removal thing
This commit is contained in:
1 parent
b619619b85
commit
22ab21e4e1
9 files changed
+221
-18
No files matched your search
@@ -58,6 +58,8 @@ class CanEditPropMixin(View):
|
||||
"""
|
||||
def dispatch(self, request, *arg, **kwargs):
|
||||
res = super(CanEditPropMixin, self).dispatch(request, *arg, **kwargs)
|
||||
if res.__class__.status_code == 302:
|
||||
return res
|
||||
if hasattr(self, 'object'):
|
||||
obj = self.object
|
||||
elif hasattr(self, 'object_list'):
|
||||
@@ -76,6 +78,8 @@ class CanEditMixin(View):
|
||||
"""
|
||||
def dispatch(self, request, *arg, **kwargs):
|
||||
res = super(CanEditMixin, self).dispatch(request, *arg, **kwargs)
|
||||
if res.__class__.status_code == 302:
|
||||
return res
|
||||
if hasattr(self, 'object'):
|
||||
obj = self.object
|
||||
elif hasattr(self, 'object_list'):
|
||||
@@ -94,6 +98,8 @@ class CanViewMixin(View):
|
||||
"""
|
||||
def dispatch(self, request, *arg, **kwargs):
|
||||
res = super(CanViewMixin, self).dispatch(request, *arg, **kwargs)
|
||||
if res.__class__.status_code == 302:
|
||||
return res
|
||||
if hasattr(self, 'object'):
|
||||
obj = self.object
|
||||
elif hasattr(self, 'object_list'):
|
||||
|
||||
Reference in new issue
Block a user