Raise permission denied on CreateView if you don't have the permission to create a sample instance, see #53
This commit is contained in:
parent
71f6436d06
commit
c466715e8a
15 changed files with 584 additions and 173 deletions
|
|
@ -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, ))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue