|
| 1 | +# [Django Modernize PRO](https://appseed.us/product/modernize-dashboard-pro/django/) |
| 2 | + |
| 3 | +**Django Dashboard** crafted by `AppSeed` on top of a modern design. **[Modernize PRO](https://appseed.us/product/modernize-dashboard-pro/django/)** is a premium `Bootstrap 5` designed by `AdminMart` that comes with feature-rich pages and developer-centric code components. This design provides many prebuilt admin layouts which give you the best selection choice for a modern dashboard. |
| 4 | + |
| 5 | +- 👉 [Modernize PRO Django](https://appseed.us/product/datta-able-pro/django/) - `product page` |
| 6 | +- 👉 [Modernize PRO Django](https://django-modernize-pro.onrender.com) - `LIVE Demo` |
| 7 | + |
| 8 | +<br /> |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- `Up-to-date dependencies` |
| 13 | +- Database: `SQLite`, PgSQL, MySql |
| 14 | +- **Authentication** |
| 15 | + - `Session-Based authentication` |
| 16 | + - `Social Login`: **Github** & **Google** |
| 17 | +- **User Extended profile** |
| 18 | +- **API** via DRF |
| 19 | +- DataTables |
| 20 | +- Charts |
| 21 | +- Celery |
| 22 | +- File Manager |
| 23 | +- i18n (internationalization) |
| 24 | +- `Docker` |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +<br /> |
| 29 | + |
| 30 | +## Start in `Docker` |
| 31 | + |
| 32 | +> **Step 1** - Download the [code](https://appseed.us/product/modernize-dashboard-pro/django/) and unzip the sources (requires a `purchase`). |
| 33 | +
|
| 34 | +```bash |
| 35 | +$ unzip django-modernize-pro.zip |
| 36 | +$ cd django-modernize-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 | +> **Step 1** - Download the [code](https://appseed.us/product/modernize-dashboard-pro/django/) and unzip the sources (requires a `purchase`). |
| 79 | +
|
| 80 | +```bash |
| 81 | +$ unzip django-modernize-pro.zip |
| 82 | +$ cd django-modernize-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 | +## Enable Social Login |
| 170 | + |
| 171 | +> 👉 **Github Setup** - [Create an OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) |
| 172 | +
|
| 173 | +- SignIN to `Github` |
| 174 | +- Access `Settings` -> `Developer Settings` -> `OAuth Apps` |
| 175 | +- Edit your OAuth App |
| 176 | + - `App Name` |
| 177 | + - `App Description` |
| 178 | + - (mandatory) `HomePage`: `https://localhost:8000` |
| 179 | + - (mandatory) `Authorization callback URL`: `https://localhost:8000/` |
| 180 | + - Generate a new `secret key` |
| 181 | + |
| 182 | +<br /> |
| 183 | + |
| 184 | +## Codebase |
| 185 | + |
| 186 | +The project is coded using a simple and intuitive structure presented below: |
| 187 | + |
| 188 | +```bash |
| 189 | +< PROJECT ROOT > |
| 190 | + | |
| 191 | + |-- core/ # Implements app configuration |
| 192 | + | |-- settings.py # Defines Global Settings |
| 193 | + | |-- wsgi.py # Start the app in production |
| 194 | + | |-- urls.py # Define URLs served by all apps/nodes |
| 195 | + | |
| 196 | + |-- home/ # Serves all pages from the UI Kit |
| 197 | + | |
| 198 | + |-- apps/ |
| 199 | + | | |
| 200 | + | |-- common/ # Assets used by all APPS (models, helpers) |
| 201 | + | |-- users/ # Handles Auth Flow |
| 202 | + | |-- api/ # DRF API |
| 203 | + | |-- charts/ # Charts APP |
| 204 | + | |-- tables/ # DataTables APP |
| 205 | + | |-- tasks/ # Celery App |
| 206 | + | |
| 207 | + |-- templates/ # Pages & Templates |
| 208 | + |-- assets/ # Static Assets [ JS, CSS, images ] |
| 209 | + | |
| 210 | + |-- requirements.txt # Development modules - SQLite storage |
| 211 | + | |
| 212 | + |-- .env # Environment |
| 213 | + |-- env.sample # Environment Sample |
| 214 | + | |
| 215 | + |-- manage.py # Django Manager File |
| 216 | + | |
| 217 | + |-- ************************************************************************ |
| 218 | +``` |
| 219 | + |
| 220 | +<br /> |
| 221 | + |
| 222 | +--- |
| 223 | +[Django Modernize PRO](https://appseed.us/product/modernize-dashboard-pro/django/) - Starter crafted by **[AppSeed](https://appseed.us/)**. |
0 commit comments