Skip to content

Commit 2124b0a

Browse files
committed
Initial commit
0 parents  commit 2124b0a

File tree

1,923 files changed

+74872
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,923 files changed

+74872
-0
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DEBUG=True
2+
SECRET_KEY=S3cr3t_K#Key
3+
SERVER=django-dashboard-volt.appseed.us

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# tests and coverage
6+
*.pytest_cache
7+
.coverage
8+
9+
# database & logs
10+
*.db
11+
*.sqlite3
12+
*.log
13+
14+
# venv
15+
env
16+
venv
17+
18+
# other
19+
.DS_Store
20+
21+
# javascript
22+
package-lock.json
23+
24+
staticfiles/*
25+
!staticfiles/.gitkeep
26+
.vscode/symbols.json

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Change Log
2+
3+
## [1.0.0] 2020-10-02
4+
### Initial Release

Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.6
2+
3+
ENV FLASK_APP run.py
4+
5+
COPY manage.py gunicorn-cfg.py requirements.txt .env ./
6+
COPY app app
7+
COPY authentication authentication
8+
COPY core core
9+
10+
RUN pip install -r requirements.txt
11+
12+
RUN python manage.py makemigrations
13+
RUN python manage.py migrate
14+
15+
EXPOSE 5005
16+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]

LICENSE.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MIT License
2+
3+
Copyright (c) 2019 - present [AppSeed](http://appseed.us/)
4+
5+
<br />
6+
7+
## Licensing Information
8+
9+
<br />
10+
11+
| Item | - |
12+
| ---------------------------------- | --- |
13+
| License Type | MIT |
14+
| Use for print | **YES** |
15+
| Create single personal website/app | **YES** |
16+
| Create single website/app for client | **YES** |
17+
| Create multiple website/apps for clients | **YES** |
18+
| Create multiple SaaS applications | **YES** |
19+
| End-product paying users | **YES** |
20+
| Product sale | **YES** |
21+
| Remove footer credits | **YES** |
22+
| --- | --- |
23+
| Remove copyright mentions from source code | NO |
24+
| Production deployment assistance | NO |
25+
| Create HTML/CSS template for sale | NO |
26+
| Create Theme/Template for CMS for sale | NO |
27+
| Separate sale of our UI Elements | NO |
28+
29+
<br />
30+
31+
---
32+
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* >

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn core.wsgi --log-file=-

README.md

+233
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
# [Django Dashboard](http://appseed.us/admin-dashboards/django) - Volt Bootstrap 5
2+
3+
Open-Source **Django Dashboard** coded with basic modules, database, ORM and deployment scripts on top of **[Volt Dashboard](https://docs.appseed.us/bootstrap-template/volt-dashboard/)** (free version), a modern Bootstrap dashboard design. Volt is a free and open source Bootstrap 5 Admin Dashboard featuring over 100 components, 11 example pages and 3 customized plugins. **Volt does not require jQuery** as a dependency meaning that every library and script's are jQuery free.
4+
5+
<br />
6+
7+
> Features
8+
9+
- SQLite Database, Django Native ORM
10+
- Modular design, clean codebase
11+
- Session-Based Authentication, Forms validation
12+
- Deployment scripts: Docker, Gunicorn / Nginx
13+
- Support via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup).
14+
15+
<br />
16+
17+
> Links
18+
19+
- [Django Dashboard Volt](https://appseed.us/admin-dashboards/django-dashboard-volt) - product page
20+
- [Django Dashboard Volt - Demo](https://django-dashboard-volt.appseed.us/) - LIVE deployment
21+
- [Django Dashboard Volt - Docs](https://docs.appseed.us/admin-dashboards/django-dashboard-volt/) - Product documentation
22+
- **[Django Dashboard Volt PRO](https://appseed.us/admin-dashboards/django-dashboard-volt-pro?ref=dev)** - Premium version
23+
24+
<br />
25+
26+
## UI Kit - **[Volt Dashboard](https://docs.appseed.us/bootstrap-template/volt-dashboard/)**
27+
28+
Volt is a free and open source **Bootstrap 5** powered admin dashboard with components, pages and plugins that you can use to create an awesome admin interfaces. It also comes with a pro version with more pages, plugins and components.
29+
30+
**100+ Components, 11 Sample pages** - There are more than 100 free Bootstrap 5 components included some of them being buttons, alerts, modals, datepickers, all nicely documented via the official components docs. Volt brings 11 example pages including an overview, sign in, sign up, transactions page and many more.
31+
32+
**Tooling** - Sass files and a Gulp commands file that will let you build minified and un-minified project files with the ability to even add certain blocks of code based on your environment.
33+
34+
- [Product Page](https://themesberg.com/product/admin-dashboard/volt-bootstrap-5-dashboard) - hosted by [Themesberg](https://appseed.us/agency/themesberg)
35+
- [Product Docs - Quick Start](https://themesberg.com/docs/volt-bootstrap-5-dashboard/getting-started/quick-start/) - official product documentation
36+
37+
<br />
38+
39+
## Want more? Go PRO!
40+
41+
PRO versions include **Premium UI Kits**, Lifetime updates and **24/7 LIVE Support** (via [Discord](https://discord.gg/fZC6hup))
42+
43+
| [Django Gradient PRO](https://appseed.us/admin-dashboards/django-dashboard-gradient-pro) | [Django Dashboard Black PRO](https://appseed.us/admin-dashboards/django-dashboard-black-pro) | [Django Dashboard Argon PRO](https://appseed.us/admin-dashboards/django-dashboard-argon-pro) |
44+
| --- | --- | --- |
45+
| [![Django Gradient PRO](https://raw.githubusercontent.com/app-generator/django-dashboard-gradient-pro/master/media/django-dashboard-gradient-pro-screen.png)](https://appseed.us/admin-dashboards/django-dashboard-gradient-pro) | [![Django Dashboard Black PRO](https://raw.githubusercontent.com/app-generator/django-dashboard-black-pro/master/media/django-dashboard-black-pro-screen.png)](https://appseed.us/admin-dashboards/django-dashboard-black-pro) | [![Django Dashboard Argon PRO](https://raw.githubusercontent.com/app-generator/django-dashboard-argon-pro/master/media/django-dashboard-argon-pro-screen.png)](https://appseed.us/admin-dashboards/django-dashboard-argon-pro)
46+
47+
<br />
48+
<br />
49+
50+
![Django Dashboard Volt - Template project provided by AppSeed.](https://raw.githubusercontent.com/app-generator/django-dashboard-volt/master/media/django-dashboard-volt-screen.png)
51+
52+
<br />
53+
54+
## How to use it
55+
56+
```bash
57+
$ # Get the code
58+
$ git clone https://github.com/app-generator/django-dashboard-volt.git
59+
$ cd django-dashboard-volt
60+
$
61+
$ # Virtualenv modules installation (Unix based systems)
62+
$ virtualenv env
63+
$ source env/bin/activate
64+
$
65+
$ # Virtualenv modules installation (Windows based systems)
66+
$ # virtualenv env
67+
$ # .\env\Scripts\activate
68+
$
69+
$ # Install modules - SQLite Storage
70+
$ pip3 install -r requirements.txt
71+
$
72+
$ # Create tables
73+
$ python manage.py makemigrations
74+
$ python manage.py migrate
75+
$
76+
$ # Start the application (development mode)
77+
$ python manage.py runserver # default port 8000
78+
$
79+
$ # Start the app - custom port
80+
$ # python manage.py runserver 0.0.0.0:<your_port>
81+
$
82+
$ # Access the web app in browser: http://127.0.0.1:8000/
83+
```
84+
85+
> Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages.
86+
87+
<br />
88+
89+
## Code-base structure
90+
91+
The project is coded using a simple and intuitive structure presented bellow:
92+
93+
```bash
94+
< PROJECT ROOT >
95+
|
96+
|-- core/ # Implements app logic and serve the static assets
97+
| |-- settings.py # Django app bootstrapper
98+
| |-- wsgi.py # Start the app in production
99+
| |-- urls.py # Define URLs served by all apps/nodes
100+
| |
101+
| |-- static/
102+
| | |-- <css, JS, images> # CSS files, Javascripts files
103+
| |
104+
| |-- templates/ # Templates used to render pages
105+
| |
106+
| |-- includes/ # HTML chunks and components
107+
| | |-- navigation.html # Top menu component
108+
| | |-- sidebar.html # Sidebar component
109+
| | |-- footer.html # App Footer
110+
| | |-- scripts.html # Scripts common to all pages
111+
| |
112+
| |-- layouts/ # Master pages
113+
| | |-- base-fullscreen.html # Used by Authentication pages
114+
| | |-- base.html # Used by common pages
115+
| |
116+
| |-- accounts/ # Authentication pages
117+
| | |-- login.html # Login page
118+
| | |-- register.html # Register page
119+
| |
120+
| index.html # The default page
121+
| page-404.html # Error 404 page
122+
| page-500.html # Error 404 page
123+
| *.html # All other HTML pages
124+
|
125+
|-- authentication/ # Handles auth routes (login and register)
126+
| |
127+
| |-- urls.py # Define authentication routes
128+
| |-- views.py # Handles login and registration
129+
| |-- forms.py # Define auth forms
130+
|
131+
|-- app/ # A simple app that serve HTML files
132+
| |
133+
| |-- views.py # Serve HTML pages for authenticated users
134+
| |-- urls.py # Define some super simple routes
135+
|
136+
|-- requirements.txt # Development modules - SQLite storage
137+
|
138+
|-- .env # Inject Configuration via Environment
139+
|-- manage.py # Start the app - Django default start script
140+
|
141+
|-- ************************************************************************
142+
```
143+
144+
<br />
145+
146+
> The bootstrap flow
147+
148+
- Django bootstrapper `manage.py` uses `core/settings.py` as the main configuration file
149+
- `core/settings.py` loads the app magic from `.env` file
150+
- Redirect the guest users to Login page
151+
- Unlock the pages served by *app* node for authenticated users
152+
153+
<br />
154+
155+
## Deployment
156+
157+
The app is provided with a basic configuration to be executed in [Docker](https://www.docker.com/), [Gunicorn](https://gunicorn.org/), and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
158+
159+
### [Docker](https://www.docker.com/) execution
160+
---
161+
162+
The application can be easily executed in a docker container. The steps:
163+
164+
> Get the code
165+
166+
```bash
167+
$ git clone https://github.com/app-generator/django-dashboard-volt.git
168+
$ cd django-dashboard-volt
169+
```
170+
171+
> Start the app in Docker
172+
173+
```bash
174+
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d
175+
```
176+
177+
Visit `http://localhost:5005` in your browser. The app should be up & running.
178+
179+
<br />
180+
181+
### [Gunicorn](https://gunicorn.org/)
182+
---
183+
184+
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX.
185+
186+
> Install using pip
187+
188+
```bash
189+
$ pip install gunicorn
190+
```
191+
> Start the app using gunicorn binary
192+
193+
```bash
194+
$ gunicorn --bind=0.0.0.0:8001 core.wsgi:application
195+
Serving on http://localhost:8001
196+
```
197+
198+
Visit `http://localhost:8001` in your browser. The app should be up & running.
199+
200+
201+
<br />
202+
203+
### [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/)
204+
---
205+
206+
Waitress (Gunicorn equivalent for Windows) is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones that live in the Python standard library.
207+
208+
> Install using pip
209+
210+
```bash
211+
$ pip install waitress
212+
```
213+
> Start the app using [waitress-serve](https://docs.pylonsproject.org/projects/waitress/en/stable/runner.html)
214+
215+
```bash
216+
$ waitress-serve --port=8001 core.wsgi:application
217+
Serving on http://localhost:8001
218+
```
219+
220+
Visit `http://localhost:8001` in your browser. The app should be up & running.
221+
222+
<br />
223+
224+
## Credits & Links
225+
226+
- [Django](https://www.djangoproject.com/) - The official website
227+
- [Boilerplate Code](https://appseed.us/boilerplate-code) - Index provided by **AppSeed**
228+
- [Boilerplate Code](https://github.com/app-generator/boilerplate-code) - Index published on Github
229+
230+
<br />
231+
232+
---
233+
[Django Dashboard Volt](https://appseed.us/admin-dashboards/django-dashboard-volt) - Provided by **AppSeed** [Web App Generator](https://appseed.us/app-generator).

app/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""

app/admin.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.contrib import admin
7+
8+
# Register your models here.

app/config.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.apps import AppConfig
7+
8+
class MyConfig(AppConfig):
9+
name = 'cfg'

app/migrations/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""

app/models.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.db import models
7+
from django.contrib.auth.models import User
8+
9+
# Create your models here.
10+

app/tests.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.test import TestCase
7+
8+
# Create your tests here.

app/urls.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.urls import path, re_path
7+
from app import views
8+
9+
urlpatterns = [
10+
11+
# The home page
12+
path('', views.index, name='home'),
13+
14+
# Matches any html file
15+
re_path(r'^.*\.*', views.pages, name='pages'),
16+
17+
]

0 commit comments

Comments
 (0)