|
1 | | -# [Django Material BS5 PRO](https://appseed.us/product/material-dashboard2-pro/django/) |
| 1 | +# [Django Material Dashboard PRO](https://app-generator.dev/product/material-dashboard-pro/django/) |
2 | 2 |
|
3 | | -**Django** starter styled with **[Material Dashboard PRO](https://appseed.us/product/material-dashboard2-pro/django/)**, a premium `Bootstrap 5` KIT from `Creative-Tim` |
| 3 | +**Django** starter styled with **[Material Dashboard PRO](https://app-generator.dev/product/material-dashboard-pro/django/)**, a premium `Bootstrap 5` KIT from `Creative-Tim`. |
4 | 4 | The product is designed to deliver the best possible user experience with highly customizable feature-rich pages. |
5 | 5 |
|
6 | | -- 👉 [Django Material Dash 2 PRO](https://appseed.us/product/material-dashboard2-pro/django/) - `Product page` |
7 | | -- 👉 [Django Material Dash 2 PRO](https://django-material-dash2-pro.onrender.com/) - `LIVE Demo` |
| 6 | +- 👉 [Django Material Dashboard PRO](https://app-generator.dev/product/material-dashboard-pro/django/) - `Product Page` |
| 7 | +- 👉 [Django Material Dashboard PRO](https://django-material-dash2-pro.onrender.com/) - `LIVE Demo` |
| 8 | +- 👉 [Django Material Dashboard PRO Documentation](https://app-generator.dev/docs/products/django/material-dashboard-pro/index.html) - `Complete Information` and Support Links |
| 9 | + - [Getting Started with Django](https://app-generator.dev/docs/technologies/django/index.html) - a `comprehensive tutorial` |
| 10 | + - `Configuration`: Install Dependencies, Prepare Environment, Setting up the Database |
| 11 | + - `Start with Docker` |
| 12 | + - `Manual Build` |
| 13 | + - `Start the project` |
| 14 | + - `Deploy on Render` |
8 | 15 |
|
9 | 16 | <br /> |
10 | 17 |
|
11 | 18 | ## Features |
12 | 19 |
|
13 | | -- `Up-to-date dependencies` |
14 | | -- Database: `SQLite`, PgSQL, MySql |
15 | | -- **Authentication** |
16 | | - - `Session-Based authentication` |
17 | | - - `Social Login`: **Github** & **Google** |
18 | | -- **User Extended profile** |
19 | | -- **API** via DRF |
20 | | -- DataTables |
21 | | -- Charts |
22 | | -- Celery |
23 | | -- File Manager |
24 | | -- `Docker` |
25 | | - |
26 | | - |
27 | | - |
28 | | -<br /> |
29 | | - |
30 | | -## Start in `Docker` |
31 | | - |
32 | | -> **Step 1** - Download the [code](https://appseed.us/product/material-dashboard2-pro/django/) and unzip the sources (requires a `purchase`). |
33 | | -
|
34 | | -```bash |
35 | | -$ unzip django-material-dashboard2-pro.zip |
36 | | -$ cd django-material-dashboard2-pro |
37 | | -``` |
38 | | - |
39 | | -<br /> |
40 | | - |
41 | | -> **Step 2** - Start the APP in `Docker` |
42 | | -
|
43 | | -```bash |
44 | | -# Optional (kill all existing containers) |
45 | | -$ docker container kill $(docker ps -q) ; docker container rm $(docker ps -a -q) ; docker network prune -f |
46 | | -# Start the APP |
47 | | -$ docker-compose up --build |
48 | | -``` |
49 | | - |
50 | | -Visit `http://localhost:5085` in your browser. The app should be up & running. |
51 | | - |
52 | | -<br /> |
53 | | - |
54 | | -## Create new `.env` from `env.sample` |
55 | | - |
56 | | -The meaning of each variable can be found below: |
57 | | - |
58 | | -- `DEBUG`: if `True` the app runs in develoment mode |
59 | | - - For production value `False` should be used |
60 | | -- `MYSQL` credentials |
61 | | - - `DB_ENGINE`, default value = `mysql` |
62 | | - - `DB_NAME`, default value = `appseed_db` |
63 | | - - `DB_HOST`, default value = `localhost` |
64 | | - - `DB_PORT`, default value = `3306` |
65 | | - - `DB_USERNAME`, default value = `appseed_db_usr` |
66 | | - - `DB_PASS`, default value = `pass` |
67 | | -- `OAuth` via Github |
68 | | - - `GITHUB_ID`=<GITHUB_ID_HERE> |
69 | | - - `GITHUB_SECRET`=<GITHUB_SECRET_HERE> |
70 | | -- `OAuth` via Google |
71 | | - - `GOOGLE_CLIENT_ID`=<GOOGLE_ID_HERE> |
72 | | - - `GOOGLE_SECRET_KEY`=<GOOGLE_SECRET_HERE> |
73 | | - |
74 | | -<br /> |
75 | | - |
76 | | -## Manual Build |
77 | | - |
78 | | -> - Download the [code](https://appseed.us/product/material-dashboard2-pro/django/) and unzip the sources (requires a `purchase`). |
79 | | -
|
80 | | -```bash |
81 | | -$ unzip django-material-dashboard2-pro.zip |
82 | | -$ cd django-material-dashboard2-pro |
83 | | -``` |
84 | | - |
85 | | -<br /> |
86 | | - |
87 | | -### 👉 Set Up for `Unix`, `MacOS` |
88 | | - |
89 | | -> Install modules via `VENV` |
90 | | -
|
91 | | -```bash |
92 | | -$ virtualenv env |
93 | | -$ source env/bin/activate |
94 | | -$ pip3 install -r requirements.txt |
95 | | -``` |
96 | | - |
97 | | -<br /> |
98 | | - |
99 | | -> Set Up Database |
100 | | -
|
101 | | -```bash |
102 | | -$ python manage.py makemigrations |
103 | | -$ python manage.py migrate |
104 | | -``` |
105 | | - |
106 | | -<br /> |
107 | | - |
108 | | -> Create Superuser |
109 | | -
|
110 | | -```bash |
111 | | -$ python manage.py createsuperuser |
112 | | -``` |
113 | | - |
114 | | -<br /> |
115 | | - |
116 | | -> Start the app |
117 | | -
|
118 | | -```bash |
119 | | -$ python manage.py runserver |
120 | | -``` |
121 | | - |
122 | | -At this point, the app runs at `http://127.0.0.1:8000/`. |
123 | | - |
124 | | -<br /> |
125 | | - |
126 | | -### 👉 Set Up for `Windows` |
127 | | - |
128 | | -> Install modules via `VENV` (windows) |
129 | | -
|
130 | | -``` |
131 | | -$ virtualenv env |
132 | | -$ .\env\Scripts\activate |
133 | | -$ pip3 install -r requirements.txt |
134 | | -``` |
135 | | - |
136 | | -<br /> |
137 | | - |
138 | | -> Set Up Database |
139 | | -
|
140 | | -```bash |
141 | | -$ python manage.py makemigrations |
142 | | -$ python manage.py migrate |
143 | | -``` |
144 | | - |
145 | | -<br /> |
146 | | - |
147 | | -> Start the app |
148 | | -
|
149 | | -```bash |
150 | | -$ python manage.py runserver |
151 | | -``` |
152 | | - |
153 | | -At this point, the app runs at `http://127.0.0.1:8000/`. |
154 | | - |
155 | | -<br /> |
156 | | - |
157 | | -### 👉 Create Users |
158 | | - |
159 | | -By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up: |
160 | | - |
161 | | -- Start the app |
162 | | -- Access the `registration` page and create a new user: |
163 | | - - `http://127.0.0.1:8000/register/` |
164 | | -- Access the `sign in` page and authenticate |
165 | | - - `http://127.0.0.1:8000/login/` |
166 | | - |
167 | | -<br /> |
168 | | - |
169 | | -## Start Celery (async task) |
170 | | - |
171 | | -- Make sure you have a Redis Server running: `redis://localhost:6379` |
172 | | - - `$ redis-cli` and type `ping` |
173 | | -- In the base directory inside `tasks_scripts` folder you need to write your scripts file. |
174 | | -- Run the celery command from the CLI. |
175 | | - |
176 | | -```bash |
177 | | -$ export DJANGO_SETTINGS_MODULE="core.settings" |
178 | | -$ celery -A apps.tasks worker -l info -B |
179 | | -``` |
180 | | - |
181 | | -- You will see a new route `Apps -> Tasks` in the sidebar. |
182 | | -- You can start and cancel any task from the UI. |
183 | | - |
184 | | -<br /> |
185 | | - |
186 | | -## Enable Social Login |
187 | | - |
188 | | -> 👉 **Github Setup** - [Create an OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) |
189 | | -
|
190 | | -- SignIN to `Github` |
191 | | -- Access `Settings` -> `Developer Settings` -> `OAuth Apps` |
192 | | -- Edit your OAuth App |
193 | | - - `App Name` |
194 | | - - `App Description` |
195 | | - - (mandatory) `HomePage`: `https://localhost:8000` |
196 | | - - (mandatory) `Authorization callback URL`: `https://localhost:8000/` |
197 | | - - Generate a new `secret key` |
198 | | - |
199 | | -<br /> |
200 | | - |
201 | | -## Codebase |
202 | | - |
203 | | -The project is coded using a simple and intuitive structure presented below: |
204 | | - |
205 | | -```bash |
206 | | -< PROJECT ROOT > |
207 | | - | |
208 | | - |-- core/ # Implements app configuration |
209 | | - | |-- settings.py # Defines Global Settings |
210 | | - | |-- wsgi.py # Start the app in production |
211 | | - | |-- urls.py # Define URLs served by all apps/nodes |
212 | | - | |
213 | | - |-- home/ # Serves all pages from the UI Kit |
214 | | - | |
215 | | - |-- apps/ |
216 | | - | | |
217 | | - | |-- common/ # Assets used by all APPS (models, helpers) |
218 | | - | |-- users/ # Handles Auth Flow |
219 | | - | |-- api/ # DRF API |
220 | | - | |-- charts/ # Charts APP |
221 | | - | |-- tables/ # DataTables APP |
222 | | - | |-- tasks/ # Celery App |
223 | | - | |
224 | | - |-- templates/ # Pages & Templates |
225 | | - |-- assets/ # Static Assets [ JS, CSS, images ] |
226 | | - | |
227 | | - |-- requirements.txt # Development modules - SQLite storage |
228 | | - | |
229 | | - |-- .env # Environment |
230 | | - |-- env.sample # Environment Sample |
231 | | - | |
232 | | - |-- manage.py # Django Manager File |
233 | | - | |
234 | | - |-- ************************************************************************ |
235 | | -``` |
236 | | - |
237 | | -<br /> |
| 20 | +- Simple, Easy-to-Extend Codebase |
| 21 | +- Material UI Dashboard PRO Design - Full Integration |
| 22 | +- Bootstrap 5 Styling |
| 23 | +- Session-based Authentication, Password recovery |
| 24 | +- OAuth (GitHub & Google) |
| 25 | +- DB Persistence: SQLite (default), can be used with MySql, PgSql |
| 26 | +- Apps |
| 27 | + - Charts |
| 28 | + - Server-Side Datatables |
| 29 | + - API via DRF |
| 30 | + - Extended Users Profile |
| 31 | + - Async Tasks (Celery) |
| 32 | +- Docker |
| 33 | +- CI/CD integration for Render |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +<br /> |
238 | 38 |
|
239 | 39 | --- |
240 | | -[Django Material Dash2 PRO](https://appseed.us/product/material-dashboard2-pro/django/) - Starter crafted by **[AppSeed](https://appseed.us/)**. |
| 40 | +[Django Material Dashboard PRO](https://app-generator.dev/product/material-dashboard-pro/django/) - **Django** Starter provided by [App Generator](https://app-generator.dev) |
0 commit comments