I have a problem of collation between grappelli and django-constance moduls (the saving isn't working).
I'm using django-constance v.1.0.1 and cannot upgrade it because the new versions does not work with django 1.6 .
I want to disable grapelli on the constance specific page. How do I do that?
Related
I have built a Django application with a custom interface. It hasn't been changed in a couple of years.
These (previous) servers are running Django 3.0.8.
Recently I set up a new server, and the Django Admin interface now shows the model list in a scrolling iframe, and long tables on the right side are also scrolled independently of the page.
This server is running Django 3.2.3.
I don't like the new interface, but it more importantly it will require an extensive rewrite of our custom admin css.
Can anyone point me to information about the change, or tell me if there is a setting to disable it?
I found the answer in this Stack Overflow answer. I will leave this question up because the other answer doesn't mention iframes.
Django 3.1 added the new scrolling sidebar in an iframe.
To disable it add the following to the root urls.py file:
from django.contrib import admin
admin.autodiscover()
admin.site.enable_nav_sidebar = False
The 3.1 Release Notes say:
The admin now has a sidebar on larger screens for easier navigation. It is enabled by default but can be disabled by using a custom AdminSite and setting AdminSite.enable_nav_sidebar to False.
Reference links from the original answer:
Django 3.1 release notes
The Django admin site
I am working on an existing django project where admin console is extensively used.
With my latest run of package upgrade for my application admin page layout has changed.
Models have started appearing on all the pages, leaving a small space to display form fields.
For example this is how form page look like now:
Original Form view was occupying the whole page like this:
Any clue on what has been changed and which setting to change to get back the original view?
From the django-3.1 release notes,
The admin now has a sidebar on larger screens for easier navigation.
It is enabled by default but can be disabled by using a custom
AdminSite and setting AdminSite.enable_nav_sidebar
to False.
You can refer Customizing the AdminSite class - (django doc) to know more about customizing the AdminSite
Try this, open your browser and clear all the history then login back in again and it should work. I am sure the browser has cached an old version of Django admin.
I had the same problem when using version 3.1. I started a new demo app with version 2.2 to demonstrate something and when I got back to version 3.1 I got that issue, So what I did was just clear the browser history and everything came to its original state.
I was in the process of upgrading my wagtail app to Django 2.0. After resolving the on-delete errors I thought I had a working app until I went to the /admin page. The standard Wagtail admin interface has disappeared and has been replaced by the default Django admin interface. Can anyone help?
https://github.com/timcknowles/wagtailcmsdemo/tree/django2
Many thanks in advance
Your urls.py has the Django admin before the Wagtail admin, so the Django admin "wins out".
Swap the order of those two, or maybe rename the Django admin prefix to ^djangoadmin/.
I have recently migrated a website from Django 1.6 to Django 1.8 and I can't figure out the simple way to fix the behaviour of django admin when it displays foreignkey fields that use the "raw_id_fields" in the adminClass.
The use case is exactly the one from django book : http://www.djangobook.com/en/2.0/chapter06.html (Figure 6-14)
class BookAdmin(admin.ModelAdmin):
...
raw_id_fields = ('publisher',)
Administration display used to have a spyglass at the end allowing to pick a new foreignkey id, but now none is displayed.
Documentation hint's at some new mechanism but it's unclear how to apply it here:
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides
Thanks
As often, the problem was elsewhere, the statics from the admin had not been updated and i was using an older version of admin static files.
a simple python manage.py collectatic command fixed this issue.
For future reference, any issue with admin should start by making sure statics are up to date.
I have integrated the "django-grappelli" from here. This plugin changed my dashboard and all admin designs but is it any ways to add admin panel menu on top. I have checked the django admin-tools but grappelli is work with admin-tools but don't have any good documentation.
If you want a menu on top, this is not supported by django-grappelli at this time. From the grappelli documentation:
Note
grappelli.dashboard is a simplified version of Django Admin Tools:
Bookmarks, Menus and the custom App-Index are not available with
Grappelli.