[Answer]-Multiple apps in Django admin

1👍

Sorry to disappoint everyone, but after a lot of searching and trial and error, I found out the right solution was to add to all the model Classes in the backend.models the following:

class Meta:
   app_label = 'backend'

Now these models are visible in the admin interface when admin.autodiscover is called.

👤oz123

0👍

You need change permissions to be able to view the app. Django doesn’t have a separate “view” permission.

👤Josh K

0👍

Try this in admin.py:

class ClassAdmin (admin.ModelAdmin):

  def formfield_for_manytomany(self, db_field, request=None, **kwargs):
      if db_field.name == 'user_permissions':
          kwargs['queryset'] = Permission.objects.filter(content_type__app_label="{{NAME_OF_APP}}")
      return super(ClassAdmin, self).formfield_for_manytomany(db_field, request=request, **kwargs)

Leave a comment