Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Grappelli #36

Open
brothag opened this issue Dec 15, 2019 · 5 comments
Open

Doesn't work with Grappelli #36

brothag opened this issue Dec 15, 2019 · 5 comments

Comments

@brothag
Copy link

brothag commented Dec 15, 2019

Hey there!
Thank you for your great work here, I really like the idea!

Unfortunately it looks like it doesn't work with Grappelli, right?

Cheers

@brothag
Copy link
Author

brothag commented Dec 15, 2019

Oh wait, it works - but you have to add it before grappelli :)
Unfortunately the style is broken, the shortcuts are overlaying the tables

@brothag
Copy link
Author

brothag commented Dec 15, 2019

this is how it looks like:
image
the problem is that the content is hidden and the "administration" headline is added statically.

this is how grappelli looks without:
image

@brothag
Copy link
Author

brothag commented Dec 15, 2019

As a temporary fix:

  1. Remove <h1 id="site-name"><a href="/">Django administration</a></h1>
  2. Change the following CSS
header#grp-header {
    position: relative !important;
}

#grp-content {
    padding: 0px 20px 120px !important;
}

.admin_shortcuts .shortcuts {
    padding: 40px 20px 10px !important;
}

How can change that locally and permanently? (I just did it temporary, using the developer tools)?

@brothag
Copy link
Author

brothag commented Dec 15, 2019

I created a new app called admin_shortcuts_grapelli_mod
added it to the INSTALLED_APPS right before admin_shortcuts.
the content of admin_shortcuts_grapelli_mod\templates\admin\base_site.html is:

{% block extrahead %}
    <style>
        header#grp-header {
            position: relative;
        }

        #grp-content {
            padding: 0px 20px 120px;
        }

        #site-name {
            display: none;
        }

        .admin_shortcuts .shortcuts {
            padding: 40px 20px 10px;
        }
    </style>
{% endblock %}```

not beautiful, but works.


A better solution would be something like a switch in the admin_shortcut settings to disable a grappelli-mod or something like this.

@brothag
Copy link
Author

brothag commented Dec 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant