|
1 | 1 | # [Django Berry PRO](https://appseed.us/product/berry-dashboard-pro/django/) |
2 | 2 |
|
3 | | -**Django** starter styled with **[Berry Dashboard PRO](https://appseed.us/product/berry-dashboard-pro/django/)**, a premium `Bootstrap 5` design from [CodedThemes](https://codedthemes.com/?ref=appseed) |
| 3 | +**Django** starter styled with **[Berry Dashboard PRO](https://appseed.us/product/berry-dashboard-pro/django/)**, a premium `Bootstrap 5` design from [CodedThemes](https://codedthemes.com/?ref=appseed). |
4 | 4 | The product is designed to deliver the best possible user experience with highly customizable feature-rich pages. |
5 | 5 |
|
6 | 6 | > **NOTE**: This product `requires a License` in order to access the theme. During the purchase, a `GitHub Access TOKEN` is provided. |
@@ -101,6 +101,106 @@ At this point, the app runs at `http://127.0.0.1:8000/`. |
101 | 101 |
|
102 | 102 | <br /> |
103 | 103 |
|
| 104 | +## Codebase structure |
| 105 | + |
| 106 | +The project is coded using a simple and intuitive structure presented below: |
| 107 | + |
| 108 | +```bash |
| 109 | +< PROJECT ROOT > |
| 110 | + | |
| 111 | + |-- core/ |
| 112 | + | |-- settings.py # Project Configuration |
| 113 | + | |-- urls.py # Project Routing |
| 114 | + | |
| 115 | + |-- home/ |
| 116 | + | |-- views.py # APP Views |
| 117 | + | |-- urls.py # APP Routing |
| 118 | + | |-- models.py # APP Models |
| 119 | + | |-- tests.py # Tests |
| 120 | + | |-- templates/ # Theme Customisation |
| 121 | + | |-- includes # |
| 122 | + | |-- custom-footer.py # Custom Footer |
| 123 | + | |
| 124 | + |-- requirements.txt # Project Dependencies |
| 125 | + | |
| 126 | + |-- env.sample # ENV Configuration (default values) |
| 127 | + |-- manage.py # Start the app - Django default start script |
| 128 | + | |
| 129 | + |-- ************************************************************************ |
| 130 | +``` |
| 131 | + |
| 132 | +<br /> |
| 133 | + |
| 134 | +## How to Customize |
| 135 | + |
| 136 | +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. |
| 137 | +The theme used to style this starter provides the following files: |
| 138 | + |
| 139 | +```bash |
| 140 | +# This exists in ENV: LIB/admin_berry_pro |
| 141 | +< UI_LIBRARY_ROOT > |
| 142 | + | |
| 143 | + |-- templates/ # Root Templates Folder |
| 144 | + | | |
| 145 | + | |-- accounts/ |
| 146 | + | | |-- login-v1.html # Sign IN Page |
| 147 | + | | |-- register-v1.html # Sign UP Page |
| 148 | + | | |
| 149 | + | |-- includes/ |
| 150 | + | | |-- footer.html # Footer component |
| 151 | + | | |-- sidebar.html # Sidebar component |
| 152 | + | | |-- navigation.html # Navigation Bar |
| 153 | + | | |-- scripts.html # Scripts Component |
| 154 | + | | |
| 155 | + | |-- layouts/ |
| 156 | + | | |-- base.html # Masterpage |
| 157 | + | | |-- base-fullscreen.html # Masterpage for Auth Pages |
| 158 | + | | |
| 159 | + | |-- pages/ |
| 160 | + | |-- index.html # INDEX page |
| 161 | + | |-- dashboard/index.html # Main dashboard page |
| 162 | + | |-- widgets/data.html # Widgets page |
| 163 | + | |-- *.html # All other pages |
| 164 | + | |
| 165 | + |-- ************************************************************************ |
| 166 | +``` |
| 167 | + |
| 168 | +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. |
| 169 | + |
| 170 | +> For instance, if we want to **customize the footer.html** these are the steps: |
| 171 | +
|
| 172 | +- ✅ `Step 1`: create the `templates` DIRECTORY inside the `home` app |
| 173 | +- ✅ `Step 2`: configure the project to use this new template directory |
| 174 | + - `core/settings.py` TEMPLATES section |
| 175 | +- ✅ `Step 3`: copy the `footer.html` from the original location (inside your ENV) and save it to the `home/templates` DIR |
| 176 | + - Source PATH: `<YOUR_ENV>/LIB/admin_berry_pro/includes/footer.html` |
| 177 | + - Destination PATH: `<PROJECT_ROOT>home/templates/includes/footer.html` |
| 178 | + |
| 179 | +> 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: |
| 180 | +
|
| 181 | +`home/templates/includes/custom-footer.html` |
| 182 | + |
| 183 | +By default, this file is unused because the `theme` expects `footer.html` (without the `custom-` prefix). |
| 184 | + |
| 185 | +In order to use it, simply rename it to `footer.html`. Like this, the default version shipped in the library is ignored by Django. |
| 186 | + |
| 187 | +In a similar way, all other files and components can be customized easily. |
| 188 | + |
| 189 | +<br /> |
| 190 | + |
| 191 | +## Deploy on [Render](https://render.com/) |
| 192 | + |
| 193 | +- Create a Blueprint instance |
| 194 | + - Go to https://dashboard.render.com/blueprints this link. |
| 195 | +- Click `New Blueprint Instance` button. |
| 196 | +- Connect your `repo` which you want to deploy. |
| 197 | +- Fill the `Service Group Name` and click on `Update Existing Resources` button. |
| 198 | +- After that your deployment will start automatically. |
| 199 | + |
| 200 | +At this point, the product should be LIVE. |
| 201 | + |
| 202 | +<br /> |
| 203 | + |
104 | 204 | ## Screenshots |
105 | 205 |
|
106 | 206 |  |
|
0 commit comments