pawamoy / django-suit-dashboard

Create a dashboard within Django admin interface.
ISC License
83 stars 20 forks source link

Use with django-constance #63

Closed arybin93 closed 2 years ago

arybin93 commented 6 years ago

If you use django-constance:

In my admin file I added: from constance.admin import ConstanceAdmin, Config admin.site.register([Config], ConstanceAdmin)

How do you think, is it need to add to note about it in docs?

pawamoy commented 6 years ago

I'm not sure to understand: how is it related to django-suit-dashboard? Your two lines of code are pieces of the usual admin.py, which has nothing to do with django-suit-dashboard.

Did something not work with this app before you add these two lines?

arybin93 commented 6 years ago

I try to use django-suit-dashboard in my project. In my project I also use django-constance.
And after this row: admin.site = DashboardSite() admin.sites.site = admin.site admin.autodiscover()

Django-constance in admin panel link broken with 404 error. I added the code presented in the topic of the issue after redefine admin.site and fix the error.

pawamoy commented 6 years ago

Ah, I get it now. Out of curiosity: can I see your INSTALLED_APPS?

arybin93 commented 6 years ago

Yes, of course.

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'constance',
'constance.backends.database',
'rest_framework',
'rest_framework_swagger',
'suit',
'suit_rq',
'django_rq',
'rq_scheduler',
'mptt',
'modeltranslation',
'django.contrib.admin.apps.SimpleAdminConfig',
"geoposition",
'mathfilters',
'jsonfield2',
'suit_redactor',
'django_select2',
'daterange_filter',
'suit_ckeditor',
'import_export',
'suit_sortable',
'docs',
'colorfield',
'suit_dashboard'

Maybe need to change order, I try to move 'constance' to end of the list, but it is not help.

pawamoy commented 6 years ago

Yes, I thought about the order. Thank you for trying it out. Until we find a way to automatically fix this, we can for sure add a note in the documentation. I'll do it later, unless you want to send a PR :slightly_smiling_face:.