Skip to content

Commit 348bad2

Browse files
committed
Release v1.0.3
1 parent 7ec079d commit 348bad2

File tree

4 files changed

+103
-17
lines changed

4 files changed

+103
-17
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [1.0.3] 2023-01-29
4+
### Changes
5+
6+
- DOCS Update (readme). New sections:
7+
- `How to customize the theme`
8+
- Render deployment
9+
- Configure the project to use `home/templates`
10+
- Added `custom_footer` sample
11+
312
## [1.0.2] 2023-01-27
413
### Changes
514

README.md

+66-16
Original file line numberDiff line numberDiff line change
@@ -121,36 +121,86 @@ The documentation for the **Soft UI Dashboard PRO Django** is hosted at our [web
121121

122122
## File Structure
123123

124-
Within the download you'll find the following directories and files:
124+
The project is coded using a simple and intuitive structure presented below:
125125

126126
```bash
127127
< PROJECT ROOT >
128128
|
129-
|-- core/ # Implements app configuration
130-
| |-- settings.py # Defines Global Settings
131-
| |-- wsgi.py # Start the app in production
132-
| |-- urls.py # Define URLs served by all apps/nodes
129+
|-- core/
130+
| |-- settings.py # Project Configuration
131+
| |-- urls.py # Project Routing
133132
|
134133
|-- home/
135-
| |
136-
| |-- views.py # Serve HTML pages for authenticated users
137-
| |-- urls.py # Define some super simple routes
138-
|
134+
| |-- views.py # APP Views
135+
| |-- urls.py # APP Routing
136+
| |-- models.py # APP Models
137+
| |-- tests.py # Tests
138+
| |-- templates/ # Theme Customisation
139+
| |-- includes #
140+
| |-- custom-footer.py # Custom Footer
141+
|
142+
|-- requirements.txt # Project Dependencies
139143
|
140-
|-- manage.py # Start the app - Django default start script
141-
|-- requirements.txt # Development modules - SQLite storage
144+
|-- env.sample # ENV Configuration (default values)
145+
|-- manage.py # Start the app - Django default start script
142146
|
143147
|-- ************************************************************************
144148
```
145149

146150
<br />
147151

148-
> The bootstrap flow
152+
## How to Customize
153+
154+
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.
155+
The theme used to style this starter provides the following files:
156+
157+
```bash
158+
< LIBRARY_ROOT > # This exists in ENV: LIB/admin_soft_pro
159+
|
160+
|-- templates/ # Root Templates Folder
161+
| |
162+
| |-- accounts/
163+
| | |-- signin/basic.html # Sign IN Page
164+
| | |-- signup/basic.html # Sign UP Page
165+
| |
166+
| |-- includes/
167+
| | |-- footer.html # Footer component
168+
| | |-- sidebar.html # Sidebar component
169+
| | |-- navigation.html # Navigation Bar
170+
| | |-- scripts.html # Scripts Component
171+
| |
172+
| |-- layouts/
173+
| | |-- base.html # Masterpage
174+
| | |-- base-fullscreen.html # Masterpage for Auth Pages
175+
| |
176+
| |-- pages/
177+
| |-- widgets.html # Widgets page
178+
| |-- messages.html # Messaging APP Page
179+
| |-- *.html # All other pages
180+
|
181+
|-- ************************************************************************
182+
```
183+
184+
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.
185+
186+
> For instance, if we want to **customize the footer.html** these are the steps:
187+
188+
-`Step 1`: create the `templates` DIRECTORY inside the `home` app
189+
-`Step 2`: configure the project to use this new template directory
190+
- `core/settings.py` TEMPLATES section
191+
-`Step 3`: copy the `footer.html` from the original location (inside your ENV) and save it to the `home/templates` DIR
192+
- Source PATH: `<YOUR_ENV>/LIB/admin_soft_pro/includes/footer.html`
193+
- Destination PATH: `<PROJECT_ROOT>home/templates/includes/footer.html`
194+
195+
> 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:
196+
197+
`home/templates/includes/custom_footer.html`
198+
199+
By default, this file is unused because the `theme` expects `footer.html` (without the `custom_` prefix).
200+
201+
In order to use it, simply rename it to `footer.html`. Like this, the default version shipped in the library is ignored by Django.
149202

150-
- Django bootstrapper `manage.py` uses `core/settings.py` as the main configuration file
151-
- `core/settings.py` loads the app magic from `.env` file
152-
- Redirect the guest users to Login page
153-
- Unlock the pages served by *app* node for authenticated users
203+
In a similar way, all other files and components can be customized easily.
154204

155205
<br />
156206

core/settings.py

+3-1
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": [
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<footer class="footer pt-3 ">
2+
<div class="container-fluid">
3+
<div class="row align-items-center justify-content-lg-between">
4+
<div class="col-lg-6 mb-lg-0 mb-4">
5+
<div class="copyright text-center text-sm text-muted text-lg-start">
6+
&copy; Your company here.
7+
</div>
8+
</div>
9+
<div class="col-lg-6">
10+
<ul class="nav nav-footer justify-content-center justify-content-lg-end">
11+
<li class="nav-item">
12+
<a href="#" class="nav-link text-muted">LINK_1</a>
13+
</li>
14+
<li class="nav-item">
15+
<a href="#" class="nav-link text-muted">LINK_2</a>
16+
</li>
17+
<li class="nav-item">
18+
<a href="https://appseed.us/support/"
19+
class="nav-link text-muted" target="_blank">Support</a>
20+
</li>
21+
</ul>
22+
</div>
23+
</div>
24+
</div>
25+
</footer>

0 commit comments

Comments
 (0)