Skip to content

Commit 83fdfd4

Browse files
author
David Farrington
committed
Update docs, bump version
1 parent 29cfb3f commit 83fdfd4

File tree

7 files changed

+201
-86
lines changed

7 files changed

+201
-86
lines changed

README.md

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# Django jazzmin (Jazzy Admin)
2-
Drop-in theme for django admin, that utilises AdminLTE & Bootstrap to make yo' admin looky jazzy
2+
Drop-in theme for django admin, that utilises AdminLTE 3 & Bootstrap 4 to make yo' admin looky jazzy
33

4-
This was initially a Fork of https://github.com/wuyue92tree/django-adminlte-ui that I refactored so much I thought it
5-
deserved its own package, big thanks to @wuyue92tree for all of his initial hard work, I am still patching into that
6-
project were possible, but this project is taking a slightly different direction.
4+
Support for custom or generated menus on the left or the top.
5+
6+
## Screenshots
7+
8+
## Dashboard
9+
![dashboard](docs/dashboard.png)
10+
11+
## List view
12+
![table list](docs/list_view.png)
13+
14+
## Detail view
15+
![form page](docs/detail_view.png)
16+
17+
## Login view
18+
![login](docs/login.png)
719

820
## Installation
921
```
@@ -12,6 +24,8 @@ pip install django-jazzmin
1224

1325
## Setup & configuration
1426

27+
See the [test_app](./tests/test_app/settings.py) for a full implementation
28+
1529
```python
1630
# settings.py
1731

@@ -24,70 +38,75 @@ INSTALLED_APPS = [
2438

2539

2640
JAZZMIN_SETTINGS = {
27-
# Choose from black, black-light, blue, blue-light, green, green-light, purple, purple-light,
28-
# red, red-light, yellow, yellow-light
29-
'skin': 'blue',
30-
3141
# title of the window
32-
'site_title': 'Django Admin',
42+
'site_title': 'Polls Admin',
3343

3444
# Title on the login screen
35-
'site_header': 'Django',
45+
'site_header': 'Polls',
3646

3747
# square logo to use for your site, must be present in static files, used for favicon and brand on top left
38-
'site_logo': 'jazzmin/img/default-log.svg',
48+
'site_logo': None,
3949

4050
# Welcome text on the login screen
41-
'welcome_sign': 'Welcome',
51+
'welcome_sign': 'Welcome to polls',
4252

4353
# Copyright on the footer
4454
'copyright': 'Acme Ltd',
4555

46-
# Wether to aut expand the menu
47-
'navigation_expanded': True,
48-
4956
# The model admin to search from the search bar, search bar omitted if excluded
50-
'search_model': 'profiles.Profile',
57+
'search_model': 'auth.User',
5158

5259
# Field name on user model that contains avatar image
53-
'user_avatar': 'avatar',
60+
'user_avatar': None,
61+
62+
# Links to put along the top menu
63+
'topmenu_links': [
64+
65+
# Url that gets reversed (Permissions can be added)
66+
{'name': 'Home', 'url': 'admin:index', 'permissions': ['auth.view_user']},
5467

55-
# Hide these apps when generating menu
56-
'hide_apps': ['auth'],
68+
# external url that opens in a new window (Permissions can be added)
69+
{'name': 'Support', 'url': 'https://github.com/farridav/django-jazzmin/issues', 'new_window': True},
5770

58-
# Hide these models when generating menu
59-
'hide_models': ['auth.user'],
71+
# model admin to link to (Permissions checked against model)
72+
{'model': 'auth.User'},
6073

61-
# List of apps to base menu ordering off of
62-
'order_with_respect_to': ['first_app', 'second_app'],
74+
# App with dropdown menu to all its models pages (Permissions checked against models)
75+
{'app': 'polls'},
76+
],
77+
78+
# Whether to display the side menu
79+
'show_sidebar': True,
80+
81+
# Whether to aut expand the menu
82+
'navigation_expanded': True,
83+
84+
# Hide these apps when generating side menu
85+
'hide_apps': [],
86+
87+
# Hide these models when generating side menu
88+
'hide_models': [],
89+
90+
# List of apps to base side menu ordering off of
91+
'order_with_respect_to': ['accounts', 'polls'],
6392

6493
# Custom links to append to app groups, keyed on app name
6594
'custom_links': {
66-
'first_app': [
67-
{'name': 'Custom link', 'url': '/', 'icon': 'fa-user', 'permissions': []}
68-
]
95+
'polls': [{
96+
'name': 'Make Messages', 'url': 'make_messages', 'icon': 'fa-comments',
97+
'permissions': ['polls.view_polls']
98+
}]
6999
},
70100

101+
# Custom icons per model in the side menu See https://www.fontawesomecheatsheet.com/font-awesome-cheatsheet-5x/
102+
# for a list of icon classes
71103
'icons': {
72-
'auth': 'fa-people',
73104
'auth.user': 'fa-user',
74105
}
75106
}
76107
```
77108

78-
## Screenshots
79-
80-
## Login view
81-
![login](docs/login.png)
82-
83-
## Dashboard
84-
![dashboard](docs/dashboard.png)
85-
86-
## List view
87-
![table list](docs/list_view.png)
88-
89-
## Detail view
90-
![form page](docs/detail_view.png)
91-
92109
# Thanks
93-
- Original Package https://github.com/wuyue92tree/django-adminlte-ui
110+
This was initially a Fork of https://github.com/wuyue92tree/django-adminlte-ui that we refactored so much we thought it
111+
deserved its own package, big thanks to @wuyue92tree for all of his initial hard work, we are still patching into that
112+
project were possible, but this project is taking a slightly different direction.

README.rst

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Installation
1414

1515
Setup & configuration
1616
=====================
17+
18+
See the test_app (https://github.com/farridav/django-jazzmin/tests/test_app/settings.py) for a full implementation
19+
1720
::
1821

1922
# settings.py
@@ -27,52 +30,69 @@ Setup & configuration
2730

2831

2932
JAZZMIN_SETTINGS = {
30-
# Choose from black, black-light, blue, blue-light, green, green-light, purple, purple-light,
31-
# red, red-light, yellow, yellow-light
32-
'skin': 'blue',
33-
3433
# title of the window
35-
'site_title': 'Django Admin',
34+
'site_title': 'Polls Admin',
3635

3736
# Title on the login screen
38-
'site_header': 'Django',
37+
'site_header': 'Polls',
3938

4039
# square logo to use for your site, must be present in static files, used for favicon and brand on top left
41-
'site_logo': 'jazzmin/img/default-log.svg',
40+
'site_logo': None,
4241

4342
# Welcome text on the login screen
44-
'welcome_sign': 'Welcome',
43+
'welcome_sign': 'Welcome to polls',
4544

4645
# Copyright on the footer
4746
'copyright': 'Acme Ltd',
4847

49-
# Wether to aut expand the menu
50-
'navigation_expanded': True,
51-
5248
# The model admin to search from the search bar, search bar omitted if excluded
53-
'search_model': 'profiles.Profile',
49+
'search_model': 'auth.User',
5450

5551
# Field name on user model that contains avatar image
56-
'user_avatar': 'avatar',
52+
'user_avatar': None,
53+
54+
# Links to put along the top menu
55+
'topmenu_links': [
56+
57+
# Url that gets reversed (Permissions can be added)
58+
{'name': 'Home', 'url': 'admin:index', 'permissions': ['auth.view_user']},
5759

58-
# Hide these apps when generating menu
59-
'hide_apps': ['auth'],
60+
# external url that opens in a new window (Permissions can be added)
61+
{'name': 'Support', 'url': 'https://github.com/farridav/django-jazzmin/issues', 'new_window': True},
6062

61-
# Hide these models when generating menu
62-
'hide_models': ['auth.user'],
63+
# model admin to link to (Permissions checked against model)
64+
{'model': 'auth.User'},
6365

64-
# List of apps to base menu ordering off of
65-
'order_with_respect_to': ['first_app', 'second_app'],
66+
# App with dropdown menu to all its models pages (Permissions checked against models)
67+
{'app': 'polls'},
68+
],
69+
70+
# Whether to display the side menu
71+
'show_sidebar': True,
72+
73+
# Whether to aut expand the menu
74+
'navigation_expanded': True,
75+
76+
# Hide these apps when generating side menu
77+
'hide_apps': [],
78+
79+
# Hide these models when generating side menu
80+
'hide_models': [],
81+
82+
# List of apps to base side menu ordering off of
83+
'order_with_respect_to': ['accounts', 'polls'],
6684

6785
# Custom links to append to app groups, keyed on app name
6886
'custom_links': {
69-
'first_app': [
70-
{'name': 'Custom link', 'url': '/', 'icon': 'fa-user', 'permissions': []}
71-
]
87+
'polls': [{
88+
'name': 'Make Messages', 'url': 'make_messages', 'icon': 'fa-comments',
89+
'permissions': ['polls.view_polls']
90+
}]
7291
},
7392

93+
# Custom icons per model in the side menu See https://www.fontawesomecheatsheet.com/font-awesome-cheatsheet-5x/
94+
# for a list of icon classes
7495
'icons': {
75-
'auth': 'fa-people',
7696
'auth.user': 'fa-user',
7797
}
7898
}
@@ -85,4 +105,6 @@ See https://github.com/farridav/django-jazzmin
85105

86106
Thanks
87107
------
88-
- Original Package https://github.com/wuyue92tree/django-adminlte-ui
108+
This was initially a Fork of https://github.com/wuyue92tree/django-adminlte-ui that we refactored so much we thought it
109+
deserved its own package, big thanks to @wuyue92tree for all of his initial hard work, we are still patching into that
110+
project were possible, but this project is taking a slightly different direction.

jazzmin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = '1.0.1'
1+
version = '2.0.0'
22
default_app_config = 'jazzmin.apps.JazzminConfig'

jazzmin/settings.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
from .utils import get_admin_url, get_custom_url, get_model_meta, get_app_admin_urls
77

88
DEFAULT_SETTINGS = {
9-
# Choose from black, black-light, blue, blue-light, green, green-light, purple, purple-light
10-
# red, red-light, yellow, yellow-light
11-
'skin': 'blue',
12-
139
# title of the window
1410
'site_title': AdminSite.site_title,
1511

@@ -56,9 +52,9 @@
5652
# Custom links to append to app groups, keyed on app name
5753
'custom_links': {},
5854

59-
# Custom icons per app or model
55+
# Custom icons per model in the side menu See https://www.fontawesomecheatsheet.com/font-awesome-cheatsheet-5x/
56+
# for a list of icon classes
6057
'icons': {
61-
'auth': 'fa-people',
6258
'auth.user': 'fa-user',
6359
}
6460
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
zip_safe=False,
2020
entry_points={},
2121
install_requires=[
22-
'django>=1.7',
22+
'django>=2',
2323
]
2424
)

tests/test_app/settings.py

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,28 @@
3737
ROOT_URLCONF = 'tests.test_app.urls'
3838

3939
JAZZMIN_SETTINGS = {
40-
'skin': 'blue',
40+
# title of the window
4141
'site_title': 'Polls Admin',
42+
43+
# Title on the login screen
4244
'site_header': 'Polls',
45+
46+
# square logo to use for your site, must be present in static files, used for favicon and brand on top left
4347
'site_logo': None,
48+
49+
# Welcome text on the login screen
4450
'welcome_sign': 'Welcome to polls',
51+
52+
# Copyright on the footer
4553
'copyright': 'Acme Ltd',
46-
'navigation_expanded': True,
54+
55+
# The model admin to search from the search bar, search bar omitted if excluded
4756
'search_model': 'auth.User',
57+
58+
# Field name on user model that contains avatar image
4859
'user_avatar': None,
49-
'hide_apps': [],
50-
'hide_models': [],
51-
'order_with_respect_to': ['accounts', 'polls'],
52-
'custom_links': {
53-
'polls': [{
54-
'name': 'Make Messages', 'url': 'make_messages', 'icon': 'fa-comments',
55-
'permissions': ['polls.view_polls']
56-
}]
57-
},
60+
61+
# Links to put along the top menu
5862
'topmenu_links': [
5963

6064
# Url that gets reversed (Permissions can be added)
@@ -69,8 +73,33 @@
6973
# App with dropdown menu to all its models pages (Permissions checked against models)
7074
{'app': 'polls'},
7175
],
76+
77+
# Whether to display the side menu
78+
'show_sidebar': True,
79+
80+
# Whether to aut expand the menu
81+
'navigation_expanded': True,
82+
83+
# Hide these apps when generating side menu
84+
'hide_apps': [],
85+
86+
# Hide these models when generating side menu
87+
'hide_models': [],
88+
89+
# List of apps to base side menu ordering off of
90+
'order_with_respect_to': ['accounts', 'polls'],
91+
92+
# Custom links to append to app groups, keyed on app name
93+
'custom_links': {
94+
'polls': [{
95+
'name': 'Make Messages', 'url': 'make_messages', 'icon': 'fa-comments',
96+
'permissions': ['polls.view_polls']
97+
}]
98+
},
99+
100+
# Custom icons per model in the side menu See https://www.fontawesomecheatsheet.com/font-awesome-cheatsheet-5x/
101+
# for a list of icon classes
72102
'icons': {
73-
'auth': 'fa-people',
74103
'auth.user': 'fa-user',
75104
}
76105
}

0 commit comments

Comments
 (0)