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