forked from beba/foerderbarometer
made declined projects read only
This commit is contained in:
parent
e9b60d7205
commit
1e075fda68
|
|
@ -86,7 +86,7 @@ class ProjectAdminForm(BaseProjectForm):
|
|||
super().__init__(*args, **kwargs)
|
||||
|
||||
for field, model in self.categories.items():
|
||||
if self.initial[f'{field}_other']:
|
||||
if self.initial.get(f'{field}_other'):
|
||||
self.initial[field] = [*self.initial[field], model.other]
|
||||
|
||||
def clean(self):
|
||||
|
|
@ -195,6 +195,12 @@ class ProjectRequestAdmin(BaseProjectAdmin):
|
|||
class ProjectDeclinedAdmin(BaseProjectAdmin):
|
||||
granted = False
|
||||
|
||||
def has_add_permission(self, request):
|
||||
return False
|
||||
|
||||
def has_change_permission(self, request, obj=None):
|
||||
return False
|
||||
|
||||
|
||||
@admin.register(BusinessCard)
|
||||
class BusinessCardAdmin(RequestURLBeforeInternNotesMixin, admin.ModelAdmin):
|
||||
|
|
|
|||
Loading…
Reference in New Issue