Comments (4)
Less coffee, more sleep. And fresh air. Jogging? Nuts are good to for brain work.
BTW can You reformat css for "Recent action"? For now "Recent actions" take plenty of admin area and leaving big empty spaces. CSS "display: inline" or "inline-block"?
Action are marked by color, it is neccessary place one kind on left, another kind on right centralized column?
from django-admin-bootstrap.
see https://github.com/django-admin-bootstrap/django-admin-bootstrap-demo/blob/master/example_app/site.py#L13
maybe it's not a bug
from django-admin-bootstrap.
Thanks @michaelkuty I will look into it this week =]
from django-admin-bootstrap.
I don't know if anyone cares about this issue and still I would like to post a solution which is not perfect because it needs to modify the module code.
The issue is due to the file bootstrap_admin_template_tags.py in templatetages folder only import the default site from django.contrib.admin, if there is any custom AdminSite is created it cannot use the new class as reference. As a result any new model register to the new custom AdminSite cannot be referenced on the sidebar.
To tackle the issue the custom AdminSite needs to be import to the bootstrap_admin_template_tags.py manually.
For example, if the custom AdminSite is created in admin.py in your app.
class MyAdminSite(AdminSite):
site_header = 'New Header'
site_title = 'New Title'
index_title = 'Admin Panel'
admin_site = MyAdminSite(name='myadmin')
admin_site.register(YourModel)
Then in bootstrap_admin_template_tags.py add the following two lines after the other modules import
from media.admin import admin_site
site = admin_site
In this way the site in the bootsrtap_admin_template_tags.py file is overrided by the custom AdminSite.
from django-admin-bootstrap.
Related Issues (20)
- Autocomplete fields customization HOT 1
- Maybe remove custom style for datefield calendar HOT 1
- View permission not working in sidebar menu
- Existing link values overflow main form div HOT 1
- Accessibility of the dashboard
- Works with django server but not with Apache mod_wsgi HOT 1
- Template issue HOT 2
- replace is_staff with has_permission
- not loading static files on django2.2 HOT 1
- Unable to import bootstrap_admin on django 3.0.3 HOT 2
- Six removed from django 3.0 HOT 7
- workning fine in django 3
- Exception while resolving variable 'admin_root_url' in template 'admin/index.html'. HOT 1
- List_filter doesn't appear when I use bootstrap admin HOT 1
- Actions don't display with django 3.2 HOT 1
- 'str' object has no attribute 'field' HOT 1
- Django 4 support HOT 1
- Error while navigating HOT 2
- "Invalid block tag on line 132: 'ifequal', expected 'endblock'. Did you forget to register or load this tag?" HOT 5
- Update pypi repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-admin-bootstrap.