Fix #15 -- Add a theme for the default Django Admin
parent
60f451d073
commit
ac69e95bf7
20
README.md
20
README.md
|
|
@ -44,6 +44,26 @@ INSTALLED_APPS = (
|
|||
- Run ``python manage.py collectstatic --clear``
|
||||
- Restart your application server
|
||||
|
||||
## Optional themes
|
||||
|
||||
This package ships with optional themes as fixtures, they can be installed using the
|
||||
[loaddata admin command](https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata)
|
||||
``python manage.py loaddata [fixture_theme_name]``.
|
||||
|
||||
* Original Django Admin: restore the default colours of the original admin. Fixture name:
|
||||
``admin_theme_default``
|
||||
|
||||
### Add more
|
||||
|
||||
You can add a theme you've created through the admin to this repository by
|
||||
[sending us a PR](http://makeapullrequest.com/). Here are the steps to follow to add :
|
||||
|
||||
1. Use `dumpdata` admin command in your project to export your exact theme:
|
||||
``python manage.py dumpdata admin_interface.Theme --indent 2 -o admin_theme_mystuff.json --pks=N``
|
||||
2. Copy the generated json file into the fixtures folder, making sure its name starts with `admin_theme_`
|
||||
to avoid clashes with fixtures that might be provided by other third party apps.
|
||||
3. Remove the `"pk"` from the fixture and make sure the `active` field is set to `false`.
|
||||
4. Edit the section above to document your theme.
|
||||
|
||||
## Screenshots
|
||||
###### Admin login
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
[
|
||||
{
|
||||
"model": "admin_interface.theme",
|
||||
"fields": {
|
||||
"name": "Default",
|
||||
"active": false,
|
||||
"title": "Django Administration",
|
||||
"title_visible": true,
|
||||
"logo": "",
|
||||
"logo_visible": false,
|
||||
"css_header_background_color": "#417690",
|
||||
"css_header_title_color": "#F5D974",
|
||||
"css_header_text_color": "#FFFFCC",
|
||||
"css_header_link_color": "#FFFFFF",
|
||||
"css_header_link_hover_color": "#79AEC8",
|
||||
"css_module_background_color": "#79AEC8",
|
||||
"css_module_text_color": "#FFFFFF",
|
||||
"css_module_link_color": "#FFFFFF",
|
||||
"css_module_link_hover_color": "#C4DCE8",
|
||||
"css_module_rounded_corners": true,
|
||||
"css_generic_link_color": "#447E9B",
|
||||
"css_generic_link_hover_color": "#003366",
|
||||
"css_save_button_background_color": "#417690",
|
||||
"css_save_button_background_hover_color": "#205067",
|
||||
"css_save_button_text_color": "#FFFFFF",
|
||||
"css_delete_button_background_color": "#BA2121",
|
||||
"css_delete_button_background_hover_color": "#A41515",
|
||||
"css_delete_button_text_color": "#FFFFFF",
|
||||
"css": "",
|
||||
"related_modal_active": true,
|
||||
"related_modal_background_color": "#000000",
|
||||
"related_modal_background_opacity": 0.2,
|
||||
"related_modal_rounded_corners": true,
|
||||
"list_filter_dropdown": false
|
||||
}
|
||||
}
|
||||
]
|
||||
Loading…
Reference in New Issue