You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modern template for **Django** that covers `Admin Section`, all authentication pages (registration included) crafted on top of **Modernize**, an open-source `Bootstrap 5`design from [AdminMart](https://adminmart.com/?ref=1).
3
+
Modern template for **[DjangoAdmin](https://app-generator.dev/docs/products/django-libs/theme-modernize.html)**, Auth Pages (registration included) crafted on top of **Modernize**, an open-source **Bootstrap**design.
4
4
5
-
> Actively supported by [AppSeed](https://appseed.us/) via `Email` and `Discord`.
5
+
-[Django Modernize](https://app-generator.dev/docs/products/django-libs/theme-modernize.html) - **Documentation** & Support Links
6
+
-[Getting Started with Django](https://app-generator.dev/docs/technologies/django/index.html) - Learn how to code **Django** Projects
> Add `admin_modernize` application to the `INSTALLED_APPS` setting of your Django project `settings.py` file (note it should be before `django.contrib.admin`):
50
-
51
-
```python
52
-
INSTALLED_APPS= (
53
-
...
54
-
'admin_modernize.apps.AdminModernizeConfig',
55
-
'django.contrib.admin',
56
-
)
57
-
```
58
-
59
-
<br />
60
-
61
-
> Add `LOGIN_REDIRECT_URL` and `EMAIL_BACKEND` of your Django project `settings.py` file:
> Add `admin_modernize` urls in your Django Project `urls.py` file
72
-
73
-
```python
74
-
from django.urls import path, include
75
-
76
-
urlpatterns = [
77
-
...
78
-
path('', include('admin_modernize.urls')),
79
-
]
80
-
```
81
-
82
-
<br />
83
-
84
-
> **Collect static** if you are in `production environment`:
85
-
86
-
```bash
87
-
$ python manage.py collectstatic
88
-
```
89
-
90
-
<br />
91
-
92
-
> **Start the app**
93
-
94
-
```bash
95
-
$ # Set up the database
96
-
$ python manage.py makemigrations
97
-
$ python manage.py migrate
98
-
$
99
-
$ # Create the superuser
100
-
$ python manage.py createsuperuser
101
-
$
102
-
$ # Start the application (development mode)
103
-
$ python manage.py runserver # default port 8000
104
-
```
105
-
106
-
Access the `admin` section in the browser: `http://127.0.0.1:8000/`
107
-
108
-
<br />
109
-
110
-
## How to Customize
111
-
112
-
When a template file is loaded, `Django` scans all template directories starting from the ones defined by the user, and returns the first match or an error in case the template is not found.
113
-
The theme used to style this starter provides the following files:
When the project requires customization, we need to copy the original file that needs an update (from the virtual environment) and place it in the template folder using the same path.
144
-
145
-
For instance, if we want to customize the `footer.html` these are the steps:
146
-
147
-
-`Step 1`: create the `templates` DIRECTORY inside your app
148
-
-`Step 2`: configure the project to use this new template directory
149
-
- Edit `settings.py` TEMPLATES section
150
-
-`Step 3`: copy the `footer.html` from the original location (inside your ENV) and save it to the `YOUR_APP/templates` DIR
At this point, the default version of the `footer.html` shipped in the library is ignored by Django.
156
-
157
-
In a similar way, all other files and components can be customized easily.
21
+

158
22
159
23
<br />
160
24
161
25
---
162
-
**[Django Admin Modernize](https://github.com/app-generator/django-modernize)** - Modern Admin Interface provided by **[AppSeed](https://appseed.us/)**
26
+
**[Django Modernize](https://app-generator.dev/docs/products/django-libs/theme-modernize.html)** - Modern Django Admin Interface provided by **[App-Generator](https://app-generator.dev)**
Copy file name to clipboardExpand all lines: admin_modernize/templates/admin/includes/fieldset.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,12 @@
7
7
{% for line in fieldset %}
8
8
<divclass="row">
9
9
<divclass="{% if line.fields.0 in 'last_login, date_joined' %}col-md-6{% else %}col-md-12{% endif %}">
10
-
<divclass="mb-4 {% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
11
-
{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
10
+
<divclass="mb-4 {% if line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
11
+
{% if line.fields|length == 1 %}{{ line.errors }}{% endif %}
12
12
{% for field in line %}
13
-
{# <div{%ifnotline.fields|length_is:'1' %} class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{%eliffield.is_checkbox%}class="checkbox-row"{%endif%}>#}
13
+
{# <div{%ifnotline.fields|length == 1%}class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{%eliffield.is_checkbox%}class="checkbox-row"{%endif%}>#}
14
14
15
-
{% if not line.fields|length_is:'1' and not field.is_readonly %}
15
+
{% if not line.fields|length == 1 and not field.is_readonly %}
0 commit comments