Skip to content

Commit 381e3c2

Browse files
committed
Release v1.0.4 - Bump Design & UPD Docs
1 parent 2866421 commit 381e3c2

File tree

5 files changed

+131
-2
lines changed

5 files changed

+131
-2
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
## [1.0.4] 2023-01-30
4+
### Changes
5+
6+
- Bump Design: [Django Admin Berry](https://github.com/app-generator/django-admin-berry) `1.0.10`
7+
- DOCS Update (readme). New sections:
8+
- `How to customize the theme`
9+
- Render deployment
10+
- Configure the project to use `home/templates`
11+
- Added `custom_footer` sample
12+
313
## [1.0.3] 2023-01-10
414
### Changes
515

README.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,105 @@ At this point, the app runs at `http://127.0.0.1:8000/`.
8282

8383
<br />
8484

85+
## Codebase structure
86+
87+
The project is coded using a simple and intuitive structure presented below:
88+
89+
```bash
90+
< PROJECT ROOT >
91+
|
92+
|-- core/
93+
| |-- settings.py # Project Configuration
94+
| |-- urls.py # Project Routing
95+
|
96+
|-- home/
97+
| |-- views.py # APP Views
98+
| |-- urls.py # APP Routing
99+
| |-- models.py # APP Models
100+
| |-- tests.py # Tests
101+
| |-- templates/ # Theme Customisation
102+
| |-- includes #
103+
| |-- custom-footer.py # Custom Footer
104+
|
105+
|-- requirements.txt # Project Dependencies
106+
|
107+
|-- env.sample # ENV Configuration (default values)
108+
|-- manage.py # Start the app - Django default start script
109+
|
110+
|-- ************************************************************************
111+
```
112+
113+
<br />
114+
115+
## How to Customize
116+
117+
When a template file is loaded in the controller, `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.
118+
The theme used to style this starter provides the following files:
119+
120+
```bash
121+
# This is saved in ENV: LIB/admin_berry
122+
< UI_LIBRARY_ROOT >
123+
|
124+
|-- templates/ # Root Templates Folder
125+
| |
126+
| |-- accounts/
127+
| | |-- login.html # Sign IN Page
128+
| | |-- register.html # Sign UP Page
129+
| |
130+
| |-- includes/
131+
| | |-- footer.html # Footer component
132+
| | |-- sidebar.html # Sidebar component
133+
| | |-- navigation.html # Navigation Bar
134+
| | |-- scripts.html # Scripts Component
135+
| |
136+
| |-- layouts/
137+
| | |-- base.html # Masterpage
138+
| | |-- auth_base.html # Masterpage for Auth Pages
139+
| |
140+
| |-- pages/
141+
| |-- index.html # Dashboard page
142+
| |-- color.html # Colors Page
143+
| |-- *.html # All other pages
144+
|
145+
|-- ************************************************************************
146+
```
147+
148+
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.
149+
150+
> For instance, if we want to **customize the footer.html** these are the steps:
151+
152+
-`Step 1`: create the `templates` DIRECTORY inside the `home` app
153+
-`Step 2`: configure the project to use this new template directory
154+
- `core/settings.py` TEMPLATES section
155+
-`Step 3`: copy the `footer.html` from the original location (inside your ENV) and save it to the `home/templates` DIR
156+
- Source PATH: `<YOUR_ENV>/LIB/admin_berry/includes/footer.html`
157+
- Destination PATH: `<PROJECT_ROOT>home/templates/includes/footer.html`
158+
159+
> To speed up all these steps, the **codebase is already configured** (`Steps 1, and 2`) and a `custom footer` can be found at this location:
160+
161+
`home/templates/includes/custom_footer.html`
162+
163+
By default, this file is unused because the `theme` expects `footer.html` (without the `custom_` prefix).
164+
165+
In order to use it, simply rename it to `footer.html`. Like this, the default version shipped in the library is ignored by Django.
166+
167+
In a similar way, all other files and components can be customized easily.
168+
169+
<br />
170+
171+
## Deploy on [Render](https://render.com/)
172+
173+
- Create a Blueprint instance
174+
- Go to https://dashboard.render.com/blueprints this link.
175+
- Click `New Blueprint Instance` button.
176+
- Connect your `repo` which you want to deploy.
177+
- Fill the `Service Group Name` and click on `Update Existing Resources` button.
178+
- After that your deployment will start automatically.
179+
180+
At this point, the product should be LIVE.
181+
182+
<br />
183+
85184
## [PRO Version](https://appseed.us/product/berry-dashboard-pro/django/)
86185

87186
This design is a pixel-perfect [Bootstrap 5](https://www.admin-dashboards.com/bootstrap-5-templates/) Dashboard with a fresh, new design inspired by Google's Material Design. `Material Dashboard 2 PRO` is built with over 300 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining.

core/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@
6363

6464
ROOT_URLCONF = "core.urls"
6565

66+
HOME_TEMPLATES = os.path.join(BASE_DIR, 'home', 'templates')
67+
6668
TEMPLATES = [
6769
{
6870
"BACKEND": "django.template.backends.django.DjangoTemplates",
69-
"DIRS": [],
71+
"DIRS": [HOME_TEMPLATES],
7072
"APP_DIRS": True,
7173
"OPTIONS": {
7274
"context_processors": [
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<footer class="pc-footer">
2+
<div class="footer-wrapper container-fluid">
3+
<div class="row">
4+
<div class="col my-1">
5+
<p class="m-0">
6+
&copy; Your Company HERE.
7+
</p>
8+
</div>
9+
<div class="col-auto my-1">
10+
<ul class="list-inline footer-link mb-0">
11+
<li class="list-inline-item"><a target="_blank" href="#">LINK_1</a></li>
12+
<li class="list-inline-item"><a target="_blank" href="#">LINK_2</a></li>
13+
<li class="list-inline-item"><a target="_blank" href="https://appseed.us/support/" target="_blank">Support</a></li>
14+
</ul>
15+
</div>
16+
</div>
17+
</div>
18+
</footer>

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ django
22
gunicorn
33
python-dotenv
44
whitenoise
5-
django-admin-berry==1.0.8
5+
django-admin-berry==1.0.10
66

77
# psycopg2-binary
88
# mysqlclient

0 commit comments

Comments
 (0)