|
| 1 | +# [Material Kit](https://appseed.us/generator/material-kit/) Django |
| 2 | + |
| 3 | +`Open-Source` seed project generated by AppSeed in **Django** Framework on top of **[Material Kit](https://appseed.us/generator/material-kit/)** design. Designed for those who like bold elements and beautiful websites, **Material Kit 2** is ready to help you create stunning websites and web apps. `Material Kit 2` is built with over 60 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining. |
| 4 | + |
| 5 | +<br /> |
| 6 | + |
| 7 | +> Built with [Material Kit Generator](https://appseed.us/generator/material-kit/) |
| 8 | + |
| 9 | +- Timestamp: `2022-05-25 22:04` |
| 10 | +- Build ID: `de50726c-6382-4e2c-98ea-460c0d503809` |
| 11 | +- **Free [Support](https://appseed.us/support/)** (registered users) via `Email` and `Discord` |
| 12 | + |
| 13 | +<br /> |
| 14 | + |
| 15 | +> Features |
| 16 | +
|
| 17 | +- `Up-to-date dependencies` |
| 18 | +- Database: `sqlite` |
| 19 | +- UI-Ready app, Django Native ORM |
| 20 | +- `Session-Based authentication`, Forms validation |
| 21 | + |
| 22 | +<br /> |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +<br /> |
| 27 | + |
| 28 | +## ✨ Start the app in Docker |
| 29 | + |
| 30 | +> **Step 1** - Download the code from the GH repository (using `GIT`) |
| 31 | +
|
| 32 | +```bash |
| 33 | +$ # Get the code |
| 34 | +$ git clone https://github.com/app-generator/django-material-kit.git |
| 35 | +$ cd django-material-kit |
| 36 | +``` |
| 37 | + |
| 38 | +<br /> |
| 39 | + |
| 40 | +> **Step 2** - Edit `.env` and remove or comment all `DB_*` settings (`DB_ENGINE=...`). This will activate the `SQLite` persistance. |
| 41 | +
|
| 42 | +```txt |
| 43 | +DEBUG=True |
| 44 | +
|
| 45 | +# Deployment SERVER address |
| 46 | +SERVER=.appseed.us |
| 47 | +
|
| 48 | +# For MySql Persistence |
| 49 | +# DB_ENGINE=mysql <-- REMOVE or comment for Docker |
| 50 | +# DB_NAME=appseed_db <-- REMOVE or comment for Docker |
| 51 | +# DB_HOST=localhost <-- REMOVE or comment for Docker |
| 52 | +# DB_PORT=3306 <-- REMOVE or comment for Docker |
| 53 | +# DB_USERNAME=appseed_db_usr <-- REMOVE or comment for Docker |
| 54 | +# DB_PASS=<STRONG_PASS> <-- REMOVE or comment for Docker |
| 55 | +
|
| 56 | +``` |
| 57 | + |
| 58 | +<br /> |
| 59 | + |
| 60 | +> **Step 3** - Start the APP in `Docker` |
| 61 | +
|
| 62 | +```bash |
| 63 | +$ docker-compose up --build |
| 64 | +``` |
| 65 | + |
| 66 | +Visit `http://localhost:85` in your browser. The app should be up & running. |
| 67 | + |
| 68 | +<br /> |
| 69 | + |
| 70 | +## ✨ How to use it |
| 71 | + |
| 72 | +> Download the code |
| 73 | +
|
| 74 | +```bash |
| 75 | +$ # Get the code |
| 76 | +$ git clone https://github.com/app-generator/django-material-kit.git |
| 77 | +$ cd django-material-kit |
| 78 | +``` |
| 79 | + |
| 80 | +<br /> |
| 81 | + |
| 82 | +### 👉 Set Up for `Unix`, `MacOS` |
| 83 | + |
| 84 | +> Install modules via `VENV` |
| 85 | +
|
| 86 | +```bash |
| 87 | +$ virtualenv env |
| 88 | +$ source env/bin/activate |
| 89 | +$ pip3 install -r requirements.txt |
| 90 | +``` |
| 91 | + |
| 92 | +<br /> |
| 93 | + |
| 94 | +> Set Up Database |
| 95 | +
|
| 96 | +```bash |
| 97 | +$ python manage.py makemigrations |
| 98 | +$ python manage.py migrate |
| 99 | +``` |
| 100 | + |
| 101 | +<br /> |
| 102 | + |
| 103 | +> Start the app |
| 104 | +
|
| 105 | +```bash |
| 106 | +$ python manage.py runserver |
| 107 | +``` |
| 108 | + |
| 109 | +At this point, the app runs at `http://127.0.0.1:8000/`. |
| 110 | + |
| 111 | +<br /> |
| 112 | + |
| 113 | +### 👉 Set Up for `Windows` |
| 114 | + |
| 115 | +> Install modules via `VENV` (windows) |
| 116 | +
|
| 117 | +``` |
| 118 | +$ virtualenv env |
| 119 | +$ .\env\Scripts\activate |
| 120 | +$ pip3 install -r requirements.txt |
| 121 | +``` |
| 122 | + |
| 123 | +<br /> |
| 124 | + |
| 125 | +> Set Up Database |
| 126 | +
|
| 127 | +```bash |
| 128 | +$ python manage.py makemigrations |
| 129 | +$ python manage.py migrate |
| 130 | +``` |
| 131 | + |
| 132 | +<br /> |
| 133 | + |
| 134 | +> Start the app |
| 135 | +
|
| 136 | +```bash |
| 137 | +$ python manage.py runserver |
| 138 | +``` |
| 139 | + |
| 140 | +At this point, the app runs at `http://127.0.0.1:8000/`. |
| 141 | + |
| 142 | +<br /> |
| 143 | + |
| 144 | +## ✨ Create Users |
| 145 | + |
| 146 | +By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up: |
| 147 | + |
| 148 | +- Start the app via `flask run` |
| 149 | +- Access the `registration` page and create a new user: |
| 150 | + - `http://127.0.0.1:8000/register/` |
| 151 | +- Access the `sign in` page and authenticate |
| 152 | + - `http://127.0.0.1:8000/login/` |
| 153 | + |
| 154 | +<br /> |
| 155 | + |
| 156 | +## ✨ Code-base structure |
| 157 | + |
| 158 | +The project is coded using a simple and intuitive structure presented below: |
| 159 | + |
| 160 | +```bash |
| 161 | +< PROJECT ROOT > |
| 162 | + | |
| 163 | + |-- core/ # Implements app configuration |
| 164 | + | |-- settings.py # Defines Global Settings |
| 165 | + | |-- wsgi.py # Start the app in production |
| 166 | + | |-- urls.py # Define URLs served by all apps/nodes |
| 167 | + | |
| 168 | + |-- apps/ |
| 169 | + | | |
| 170 | + | |-- home/ # A simple app that serve HTML files |
| 171 | + | | |-- views.py # Serve HTML pages for authenticated users |
| 172 | + | | |-- urls.py # Define some super simple routes |
| 173 | + | | |
| 174 | + | |-- authentication/ # Handles auth routes (login and register) |
| 175 | + | | |-- urls.py # Define authentication routes |
| 176 | + | | |-- views.py # Handles login and registration |
| 177 | + | | |-- forms.py # Define auth forms (login and register) |
| 178 | + | | |
| 179 | + | |-- static/ |
| 180 | + | | |-- <css, JS, images> # CSS files, Javascripts files |
| 181 | + | | |
| 182 | + | |-- templates/ # Templates used to render pages |
| 183 | + | |-- includes/ # HTML chunks and components |
| 184 | + | | |-- navigation.html # Top menu component |
| 185 | + | | |-- sidebar.html # Sidebar component |
| 186 | + | | |-- footer.html # App Footer |
| 187 | + | | |-- scripts.html # Scripts common to all pages |
| 188 | + | | |
| 189 | + | |-- layouts/ # Master pages |
| 190 | + | | |-- base-fullscreen.html # Used by Authentication pages |
| 191 | + | | |-- base.html # Used by common pages |
| 192 | + | | |
| 193 | + | |-- accounts/ # Authentication pages |
| 194 | + | | |-- login.html # Login page |
| 195 | + | | |-- register.html # Register page |
| 196 | + | | |
| 197 | + | |-- home/ # UI Kit Pages |
| 198 | + | |-- index.html # Index page |
| 199 | + | |-- 404-page.html # 404 page |
| 200 | + | |-- *.html # All other pages |
| 201 | + | |
| 202 | + |-- requirements.txt # Development modules - SQLite storage |
| 203 | + | |
| 204 | + |-- .env # Inject Configuration via Environment |
| 205 | + |-- manage.py # Start the app - Django default start script |
| 206 | + | |
| 207 | + |-- ************************************************************************ |
| 208 | +``` |
| 209 | + |
| 210 | +<br /> |
| 211 | + |
| 212 | +## ✨ PRO Version |
| 213 | + |
| 214 | +> For more components, pages and priority on support, feel free to take a look at this amazing starter: |
| 215 | +
|
| 216 | +**Material Kit 2** is a premium design crafted by the `Creative-Tim` agency on top of Bootstrap 5 Framework. Designed for those who like bold elements and beautiful websites, Material Kit 2 is made of hundreds of elements, designed blocks, and fully coded pages built with an impressive level of quality. |
| 217 | + |
| 218 | +- 👉 [Django Material Kit2 PRO](https://appseed.us/product/material-kit2-pro/django/) - product page |
| 219 | +- 👉 [Django Material Kit2 PRO](https://django-material-kit2-pro.appseed-srv1.com/) - LIVE Demo |
| 220 | + |
| 221 | +<br > |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | +<br /> |
| 226 | + |
| 227 | +--- |
| 228 | +[Material Kit](https://appseed.us/generator/material-kit/) Django - Open-source starter generated by **[AppSeed Generator](https://appseed.us/generator/)**. |
0 commit comments