|
1 | 1 | --- |
2 | 2 | title: Django Shards - Open-Source Starter |
3 | | -sidebar_label: Django Shards Dashboard |
| 3 | +sidebar_label: Django Shards |
4 | 4 | --- |
5 | 5 |
|
6 | | -# Django Shards Dashboard |
| 6 | +# [Django Shards](https://appseed.us/product/shards/django/) |
7 | 7 |
|
8 | | -<SubHeading> Open-source Django dashboard generated by AppSeed on top of Shards Dashboard Lite (free version).</SubHeading> |
| 8 | +<SubHeading>Open-source Django Starter coded on top Sb-Admin design.</SubHeading> |
9 | 9 |
|
10 | | -A high-quality & free Bootstrap admin dashboard template pack that comes with lots of templates and components. Based on Bootstrap 4, **Shards Dashboard Lite** is fully responsive and capable to adapt its layout to any viewport size. |
| 10 | +Django Admin Dashboard generated by the AppSeed platform on top of **Sb-Admin** design, an iconic free dahsboard template. |
11 | 11 |
|
12 | | -> Features |
| 12 | +- 👉 [Shards Django](https://appseed.us/product/shards/django/) - `Product page` |
| 13 | +- 👉 [Shards Django](https://django-shards.appseed-srv1.com/) - `LIVE Demo` |
13 | 14 |
|
14 | | -- Codebase - [Django Dashboard Boilerplate](../../boilerplate-code/starters/django-dashboard.mdx) |
15 | | -- UI Kit: Shards Dashboard (free version) provided by DesignRevision |
16 | | -- SQLite Database, Django Native ORM |
17 | | -- Session-Based Authentication, Forms validation |
18 | | -- Deployment scripts: Docker, Gunicorn/Nginx |
| 15 | +:::info [**v1.0.4**](https://github.com/app-generator/django-shards/releases) - release date `2022-06-01` |
| 16 | +::: |
19 | 17 |
|
20 | | -> Links |
| 18 | +<br /> |
21 | 19 |
|
22 | | -- [Shards Django](https://appseed.us/admin-dashboards/django-dashboard-shards) - product page |
23 | | -- [Shards Django](https://github.com/app-generator/django-dashboard-shards) - source code |
24 | | -- [Shards Django](https://django-dashboard-shards.appseed.us/) - LIVE Demo |
| 20 | +> **Features** |
25 | 21 |
|
26 | | -> [Support](https://appseed.us/support) (Email and LIVE on Discord) for **registered** [**AppSeed**](https://appseed.us/) **users**. |
| 22 | +- ✅ UI Kit: `Shards` |
| 23 | +- ✅ SQLite Database, Django Native ORM |
| 24 | +- ✅ Session-Based Authentication, Forms validation |
| 25 | +- ✅ Deployment scripts: Docker, Gunicorn/Nginx |
27 | 26 |
|
28 | | -### What is Django |
| 27 | + |
29 | 28 |
|
30 | | -Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source. |
| 29 | +<br /> |
31 | 30 |
|
32 | | -> Read more about [Django Framework](../../content/what-is/django.mdx) |
| 31 | +## Environment |
33 | 32 |
|
34 | | -### How to use the App |
| 33 | +To use the starter, [Python3](https://www.python.org) should be installed properly in the workstation. |
| 34 | +If you are not sure if Python is installed, please open a terminal and type `python --version`. Here is the full list with dependencies and tools required to build the app: |
35 | 35 |
|
36 | | -- [Set up the environment](../../boilerplate-code/starters/django-dashboard.mdx#environment-1) - prepare your workstation for **Django** |
37 | | -- [Compile the sources](../../boilerplate-code/starters/django-dashboard.mdx#build-the-app-1) - start this **Django** app in the local environment |
38 | | -- [App Codebase](../../boilerplate-code/starters/django-dashboard.mdx#app-codebase) - how the project files are organized |
39 | | -- [App Configuration](../../boilerplate-code/starters/django-dashboard.mdx#app-configuration) - how to configure this **Django** application |
| 36 | +- [Python3](https://www.python.org) - the programming language used to code the app |
| 37 | +- [GIT](https://git-scm.com) - used to clone the source code from the Github repository |
| 38 | +- Basic development tools (g++ compiler, python development libraries ..etc) used by Python to compile the app dependencies in your environment. |
| 39 | +- (Optional) `Docker` - a popular virtualization software |
40 | 40 |
|
41 | | -### Shards Dashboard UI |
| 41 | +<br /> |
42 | 42 |
|
43 | | -A high-quality & free Bootstrap admin dashboard template pack that comes with lots of templates and components. Based on Bootstrap 4, **Shards Dashboard Lite** is fully responsive and capable to adapt its layout to any viewport size. |
| 43 | +## Start in `Docker`` |
44 | 44 |
|
45 | | -- [Shards Dashboard](../../content/bootstrap-template/shards-dashboard.mdx) - information provided by AppSeed |
46 | | -- [Shards Dashboard](https://designrevision.com/downloads/shards-dashboard-lite/) - product page hosted by DesignRevision |
| 45 | +> 👉 **Step 1** - Download the [source code](https://github.com/app-generator/django-shards) from the GH repository (using `GIT`) |
47 | 46 |
|
48 | | - |
| 47 | +```bash |
| 48 | +$ # Get the code |
| 49 | +$ git clone https://github.com/app-generator/django-shards.git |
| 50 | +$ cd django-shards |
| 51 | +``` |
| 52 | + |
| 53 | +> 👉 **Step 2** - Start the APP in `Docker` |
| 54 | +
|
| 55 | +```bash |
| 56 | +$ docker-compose up --build |
| 57 | +``` |
| 58 | + |
| 59 | +Visit `http://localhost:5085` in your browser. The app should be up & running. |
| 60 | + |
| 61 | +<br /> |
| 62 | + |
| 63 | +## Manual Build |
| 64 | + |
| 65 | +> Download the [source code](https://github.com/app-generator/django-shards) from the GH repository (using `GIT`) |
| 66 | +
|
| 67 | +```bash |
| 68 | +$ # Get the code |
| 69 | +$ git clone https://github.com/app-generator/django-shards.git |
| 70 | +$ cd django-shards |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | +### 👉 Set Up for `Unix`, `MacOS` |
| 75 | + |
| 76 | +> Install modules via `VENV` |
| 77 | +
|
| 78 | +```bash |
| 79 | +$ virtualenv env |
| 80 | +$ source env/bin/activate |
| 81 | +$ pip3 install -r requirements.txt |
| 82 | +``` |
| 83 | + |
| 84 | +> Set Up Database |
| 85 | +
|
| 86 | +```bash |
| 87 | +$ python manage.py makemigrations |
| 88 | +$ python manage.py migrate |
| 89 | +``` |
| 90 | + |
| 91 | +> Start the app |
| 92 | +
|
| 93 | +```bash |
| 94 | +$ python manage.py runserver |
| 95 | +``` |
| 96 | + |
| 97 | +At this point, the app runs at `http://127.0.0.1:8000/`. |
| 98 | + |
| 99 | + |
| 100 | +### 👉 Set Up for `Windows` |
| 101 | + |
| 102 | +> Install modules via `VENV` (windows) |
| 103 | +
|
| 104 | +``` |
| 105 | +$ virtualenv env |
| 106 | +$ .\env\Scripts\activate |
| 107 | +$ pip3 install -r requirements.txt |
| 108 | +``` |
| 109 | + |
| 110 | +> Set Up Database |
| 111 | +
|
| 112 | +```bash |
| 113 | +$ python manage.py makemigrations |
| 114 | +$ python manage.py migrate |
| 115 | +``` |
| 116 | + |
| 117 | +> Start the app |
| 118 | +
|
| 119 | +```bash |
| 120 | +$ python manage.py runserver |
| 121 | +``` |
| 122 | + |
| 123 | +At this point, the app runs at `http://127.0.0.1:8000/`. |
| 124 | + |
| 125 | +<br /> |
| 126 | + |
| 127 | +## Manage App `Users` |
| 128 | + |
| 129 | +By default, the starter is not provided with users. To access the private pages and the admin section (reserved for `superusers`) follow up the next sections. |
| 130 | + |
| 131 | +### 👉 Create `Superusers` |
| 132 | + |
| 133 | +To access the `admin` section, Django requires `superuser` privilegies. Let's create a new `superuser` and access the `admin` section of the project: |
| 134 | + |
| 135 | +```bash |
| 136 | +$ python manage.py createsuperuser |
| 137 | +``` |
| 138 | + |
| 139 | +Once the `superuser` is successfully created, we can access the `admin` section: |
| 140 | + |
| 141 | +`http://localhost:8000/admin/` (make sure you have a `/` at the end). |
| 142 | + |
| 143 | + |
| 144 | +### 👉 Create (Ordinary) 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 `python manage.py runserver` |
| 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 | +## Codebase 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 | + | | |-- footer.html # App Footer |
| 186 | + | | |-- scripts.html # Scripts common to all pages |
| 187 | + | | |
| 188 | + | |-- layouts/ # Master pages |
| 189 | + | | |-- base.html # Used by common pages |
| 190 | + | | |
| 191 | + | |-- accounts/ # Authentication pages |
| 192 | + | | |-- login.html # Login page |
| 193 | + | | |-- register.html # Register page |
| 194 | + | | |
| 195 | + | |-- home/ # UI Kit Pages |
| 196 | + | |-- index.html # Index page |
| 197 | + | |-- page-404.html # 404 page |
| 198 | + | |-- *.html # All other pages |
| 199 | + | |
| 200 | + |-- requirements.txt # Development modules - SQLite storage |
| 201 | + | |
| 202 | + |-- .env # Inject Configuration via Environment |
| 203 | + |-- manage.py # Start the app - Django default start script |
| 204 | + | |
| 205 | + |-- ************************************************************************ |
| 206 | +``` |
| 207 | + |
| 208 | +<br /> |
| 209 | + |
| 210 | +## Resources |
| 211 | + |
| 212 | +- 👉 Free [Support](https://appseed.us/support/) via Email & Discord |
| 213 | +- 👉 [Custom Development Services](https://appseed.us/custom-development/) provided by experts |
| 214 | +- 🚀 [Django Datta Able PRO](https://appseed.us/product/datta-able-pro/django/) - `Premium Version` |
| 215 | + - ✅ `Enhanced UI` - more pages and components |
| 216 | + - ✅ `Priority` on support |
| 217 | + |
| 218 | + |
0 commit comments