0

I've added a Model to admin page with admin.site.register but it's being displayed only if superuser logs in.

Even if i give all permissions to a stuff user the model does not show up there even though Groups and Users model does.

How do i set this right?

EDIT: maybe he needs permissions to the module? How can give those related to user.has_module_perms ?

Kazz
  • 585
  • 1
  • 6
  • 23

1 Answers1

0

You have to either create a group, give permissions to group and then add assign that group to user or create user and assign permissions to that user.

Add group Stuff-users. Under available permissions in Available Permissions Select YourApp | YourModel | Can add... YourApp | YourModel | Can change... YourApp | YourModel | Can Delete...

Then make sure you have clicked on the arrow pointing to Change Permissions. This will move the specific permission to Change Permissions. Click Save.

Create or open Users. Select the user Stuff Select Active and Staff Users. Select Stuff-users from Available Groups and click the arrow pointing to Chosen Groups. This will move the Support group to Chosen Group. Don't make any change to User Permissions unless you want to grant additional permissions to any specific user. Click save. Have the user logout and log back in.

nomad
  • 973
  • 2
  • 9
  • 22
  • I assigned all perms in admin panel to a stuff user and he still doesn't see that model. If i make him a superuser it's there. – Kazz Mar 27 '17 at 17:07
  • Are you using a custom backend? If yes, try solution posted here. http://stackoverflow.com/questions/1929707/django-admin-not-seeing-any-app-permission-problem/7021995#7021995 If not, then see my updated answer. – nomad Mar 27 '17 at 18:08