1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Raise permission denied on CreateView if you don't have the permission to create a sample instance, see #53

This commit is contained in:
Yohann D'ANELLO
2020-08-13 15:20:15 +02:00
parent 71f6436d06
commit c466715e8a
15 changed files with 584 additions and 173 deletions

View File

@ -70,7 +70,7 @@ def pre_save_object(sender, instance, **kwargs):
if not has_perm:
raise PermissionDenied(
_("You don't have the permission to add this instance of model {app_label}.{model_name}.")
_("You don't have the permission to add an instance of model {app_label}.{model_name}.")
.format(app_label=app_label, model_name=model_name, ))