|
71 | 71 |
|
72 | 72 | DATABASES = { |
73 | 73 | "default": dj_database_url.config( |
74 | | - env="DATABASE_URL", |
75 | | - conn_max_age=500, |
76 | | - default="sqlite:///{}".format(os.path.join(BASE_DIR, "db.sqlite3")), |
| 74 | + env="DATABASE_URL", conn_max_age=500, default="sqlite:///{}".format(os.path.join(BASE_DIR, "db.sqlite3")), |
77 | 75 | ) |
78 | 76 | } |
79 | 77 |
|
80 | 78 | AUTH_PASSWORD_VALIDATORS = [ |
81 | | - { |
82 | | - "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", |
83 | | - }, |
84 | | - { |
85 | | - "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
86 | | - }, |
87 | | - { |
88 | | - "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
89 | | - }, |
90 | | - { |
91 | | - "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
92 | | - }, |
| 79 | + {"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",}, |
| 80 | + {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",}, |
| 81 | + {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",}, |
| 82 | + {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",}, |
93 | 83 | ] |
94 | 84 |
|
95 | 85 | LANGUAGE_CODE = "en" |
|
142 | 132 | # Links to put along the top menu |
143 | 133 | "topmenu_links": [ |
144 | 134 | # Url that gets reversed (Permissions can be added) |
145 | | - {"name": "Home", "url": "admin:index", "permissions": ["auth.view_user"]}, |
| 135 | + {"name": "Home", "url": "admin:index", "permissions": ["auth.view_user"], "icon": "fas fa-home"}, |
146 | 136 | # external url that opens in a new window (Permissions can be added) |
147 | 137 | { |
148 | 138 | "name": "Support", |
149 | 139 | "url": "https://github.com/farridav/django-jazzmin/issues", |
150 | 140 | "new_window": True, |
| 141 | + "icon": "fas fa-cog", |
151 | 142 | }, |
152 | 143 | # model admin to link to (Permissions checked against model) |
153 | 144 | {"model": "auth.User"}, |
154 | 145 | # App with dropdown menu to all its models pages (Permissions checked against models) |
155 | 146 | {"app": "books"}, |
156 | 147 | {"app": "loans"}, |
157 | 148 | ], |
| 149 | + "topmenu_icons": True, |
158 | 150 | ############# |
159 | 151 | # User Menu # |
160 | 152 | ############# |
161 | 153 | # Additional links to include in the user menu on the top right ('app' url type is not allowed) |
162 | 154 | "usermenu_links": [ |
163 | | - { |
164 | | - "name": "Support", |
165 | | - "url": "https://github.com/farridav/django-jazzmin/issues", |
166 | | - "new_window": True, |
167 | | - }, |
| 155 | + {"name": "Support", "url": "https://github.com/farridav/django-jazzmin/issues", "new_window": True}, |
168 | 156 | {"model": "auth.user"}, |
169 | 157 | ], |
170 | 158 | ############# |
|
200 | 188 | "auth.user": "fas fa-user", |
201 | 189 | "auth.Group": "fas fa-users", |
202 | 190 | "admin.LogEntry": "fas fa-file", |
| 191 | + "books": "fas fa-book", |
203 | 192 | "books.Author": "fas fa-user", |
204 | 193 | "books.Book": "fas fa-book", |
205 | 194 | "books.Genre": "fas fa-photo-video", |
| 195 | + "loans": "fas fa-book-open", |
206 | 196 | "loans.BookLoan": "fas fa-book-open", |
207 | 197 | "loans.Library": "fas fa-book-reader", |
208 | 198 | }, |
|
0 commit comments