forked from app-generator/django-star-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bbc98ae
Showing
170 changed files
with
49,258 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,3 @@ | ||
DEBUG=True | ||
SECRET_KEY=S3cr3t_K#Key | ||
SERVER=boilerplate-code-django-dashboard.appseed.us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,26 @@ | ||
# byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# tests and coverage | ||
*.pytest_cache | ||
.coverage | ||
|
||
# database & logs | ||
*.db | ||
*.sqlite3 | ||
*.log | ||
|
||
# venv | ||
env | ||
venv | ||
|
||
# other | ||
.DS_Store | ||
|
||
# javascript | ||
package-lock.json | ||
|
||
staticfiles/* | ||
!staticfiles/.gitkeep | ||
.vscode/symbols.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,17 @@ | ||
# Change Log | ||
|
||
## [1.0.2] 2020-06-18 | ||
### Bug fixing, Improvements | ||
|
||
- Patch #2 - Error when access `admin` path (no trailing slash) | ||
|
||
## [1.0.1] 2020-05-30 | ||
### Bug fixing, Improvements | ||
|
||
- Add CHANGELOG.md to track all changes | ||
- Patch #1 - Error-404.html not used in all contexts | ||
- Rename error pages: error-40X become page-40X | ||
- Update LICENSE file - added more information regarding the app usage | ||
|
||
## [1.0.0] 2020-02-07 | ||
### Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,16 @@ | ||
FROM python:3.6 | ||
|
||
ENV FLASK_APP run.py | ||
|
||
COPY manage.py gunicorn-cfg.py requirements.txt .env ./ | ||
COPY app app | ||
COPY authentication authentication | ||
COPY core core | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
RUN python manage.py makemigrations | ||
RUN python manage.py migrate | ||
|
||
EXPOSE 5005 | ||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,32 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2019 - present [AppSeed](http://appseed.us/) | ||
|
||
<br /> | ||
|
||
## Licensing Information | ||
|
||
<br /> | ||
|
||
| Item | - | | ||
| ---------------------------------- | --- | | ||
| License Type | MIT | | ||
| Use for print | **YES** | | ||
| Create single personal website/app | **YES** | | ||
| Create single website/app for client | **YES** | | ||
| Create multiple website/apps for clients | **YES** | | ||
| Create multiple SaaS applications | **YES** | | ||
| End-product paying users | **YES** | | ||
| Product sale | **YES** | | ||
| Remove footer credits | **YES** | | ||
| --- | --- | | ||
| Remove copyright mentions from source code | NO | | ||
| Production deployment assistance | NO | | ||
| Create HTML/CSS template for sale | NO | | ||
| Create Theme/Template for CMS for sale | NO | | ||
| Separate sale of our UI Elements | NO | | ||
|
||
<br /> | ||
|
||
--- | ||
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,37 @@ | ||
# Commercial License | ||
|
||
Copyright (c) 2019 - present [AppSeed](http://appseed.us/) | ||
|
||
<br /> | ||
|
||
## Licensing Information | ||
|
||
All commercial web apps (including this one) provided by AppSeed are released under two configurations: | ||
|
||
<br /> | ||
|
||
### [Personal License](https://github.com/app-generator/license-personal) | ||
|
||
> For full information please access [Personal License](https://github.com/app-generator/license-personal) | ||
- Create single personal website/app | ||
- Create single website/app for client | ||
- Paying end-users - YES | ||
- Production deployment assistance - NO | ||
|
||
<br /> | ||
|
||
### [Developer License](https://github.com/app-generator/license-developer) | ||
|
||
> For full information please access [Developer License](https://github.com/app-generator/license-developer) | ||
- Create multiple personal websites/apps | ||
- Create multiple websites/apps for clients | ||
- Create single SaaS application | ||
- Paying end-users - YES | ||
- Production deployment assistance - NO | ||
|
||
<br /> | ||
|
||
--- | ||
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
web: gunicorn core.wsgi --log-file=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,224 @@ | ||
# [Django Dashboard Boilerplate](https://appseed.us/boilerplate-code/django-dashboard) | ||
|
||
> Template [boilerplate code](https://appseed.us/boilerplate-code) used by [AppSeed](https://appseed.us) to generate simple admin dashboards coded in [Django](https://www.djangoproject.com/) - Features | ||
- UI Kit: **Datta Able Dashboard** (Lite Version) provided by **CodedThemes** | ||
- UI-Ready app, SQLite Database, Django Native ORM | ||
- Modular design, clean code-base | ||
- Session-Based Authentication, Forms validation | ||
- Deployment scripts: Docker, Gunicorn / Nginx | ||
- **[MIT License](https://github.com/app-generator/license-mit)** | ||
- Free support via **Github** issues tracker | ||
- Paid 24/7 Live Support via [Discord](https://discord.gg/fZC6hup). | ||
|
||
> Links | ||
- [Boierplate Code Django Dashboard](https://boilerplate-code-django-dashboard.appseed.us/) - LIVE Demo | ||
- [Boierplate Code Django](https://docs.appseed.us/boilerplate-code/django-dashboard/) - Documentation | ||
- [Boierplate Code Django Dashboard](https://appseed.us/boilerplate-code/django-dashboard) - Official product page | ||
- More [Django Admin Dashboards](https://appseed.us/admin-dashboards/django) - index hosted by **[AppSeed](https://appseed.us)** | ||
- [Open-Source Admin Dashboards](https://appseed.us/admin-dashboards/open-source) - index hosted by **[AppSeed](https://appseed.us)** | ||
|
||
> Projects that use this starter | ||
- [Django Corona Dark](https://appseed.us/admin-dashboards/django-dashboard-corona-dark) - [demo](https://django-dashboard-corona-dark.appseed.us/), [sources](https://github.com/app-generator/django-dashboard-corona-dark) | ||
- [Django DattaAble PRO](https://appseed.us/admin-dashboards/django-dashboard-dattaable-pro) - [demo](https://django-dashboard-dattaable-pro.appseed.us/) | ||
- [Django Atlantis Dark](https://appseed.us/admin-dashboards/django-dashboard-atlantis-dark) - [demo](https://django-dashboard-atlantis-dark.appseed.us/), [sources](https://github.com/app-generator/django-dashboard-atlantis-dark) | ||
|
||
<br /> | ||
|
||
## Want more? Go PRO! | ||
|
||
PRO versions include **Premium UI Kits**, Lifetime updates and **24/7 LIVE Support** (via [Discord](https://discord.gg/fZC6hup)) | ||
|
||
| [Django DattaAble Dark PRO](https://appseed.us/admin-dashboards/django-dashboard-dattaable-dark-pro) | [Django Dashboard Black PRO](https://appseed.us/admin-dashboards/django-dashboard-black-pro) | [Django StarAdmin Dark PRO](https://appseed.us/admin-dashboards/django-dashboard-staradmin-black-pro) | | ||
| --- | --- | --- | | ||
| [![Django DattaAble Dark PRO](https://raw.githubusercontent.com/app-generator/django-dashboard-dattaable-dark-pro/master/media/django-dashboard-dattaable-dark-pro-screen.png)](https://appseed.us/admin-dashboards/django-dashboard-dattaable-dark-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 StarAdmin Dark PRO](https://raw.githubusercontent.com/app-generator/django-dashboard-staradmin-black-pro/master/media/django-dashboard-staradmin-black-pro-screen.png)](https://appseed.us/admin-dashboards/django-dashboard-staradmin-black-pro) | ||
|
||
<br /> | ||
<br /> | ||
|
||
![Boierplate Code Django Dashboard - Template project provided by AppSeed.](https://raw.githubusercontent.com/app-generator/boilerplate-code-django-dashboard/master/media/boilerplate-code-django-dashboard-screen.png) | ||
|
||
<br /> | ||
|
||
## How to use it | ||
|
||
```bash | ||
$ # Get the code | ||
$ git clone https://github.com/app-generator/boilerplate-code-django-dashboard.git | ||
$ cd boilerplate-code-django-dashboard | ||
$ | ||
$ # Virtualenv modules installation (Unix based systems) | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
$ | ||
$ # Virtualenv modules installation (Windows based systems) | ||
$ # virtualenv env | ||
$ # .\env\Scripts\activate | ||
$ | ||
$ # Install modules - SQLite Storage | ||
$ pip3 install -r requirements.txt | ||
$ | ||
$ # Create tables | ||
$ python manage.py makemigrations | ||
$ python manage.py migrate | ||
$ | ||
$ # Start the application (development mode) | ||
$ python manage.py runserver # default port 8000 | ||
$ | ||
$ # Start the app - custom port | ||
$ # python manage.py runserver 0.0.0.0:<your_port> | ||
$ | ||
$ # Access the web app in browser: http://127.0.0.1:8000/ | ||
``` | ||
|
||
> Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages. | ||
<br /> | ||
|
||
## Code-base structure | ||
|
||
The project is coded using a simple and intuitive structure presented bellow: | ||
|
||
```bash | ||
< PROJECT ROOT > | ||
| | ||
|-- core/ # Implements app logic and serve the static assets | ||
| |-- settings.py # Django app bootstrapper | ||
| |-- wsgi.py # Start the app in production | ||
| |-- urls.py # Define URLs served by all apps/nodes | ||
| | | ||
| |-- static/ | ||
| | |-- <css, JS, images> # CSS files, Javascripts files | ||
| | | ||
| |-- templates/ # Templates used to render pages | ||
| | | ||
| |-- includes/ # HTML chunks and components | ||
| | |-- navigation.html # Top menu component | ||
| | |-- sidebar.html # Sidebar component | ||
| | |-- footer.html # App Footer | ||
| | |-- scripts.html # Scripts common to all pages | ||
| | | ||
| |-- layouts/ # Master pages | ||
| | |-- base-fullscreen.html # Used by Authentication pages | ||
| | |-- base.html # Used by common pages | ||
| | | ||
| |-- accounts/ # Authentication pages | ||
| | |-- login.html # Login page | ||
| | |-- register.html # Register page | ||
| | | ||
| index.html # The default page | ||
| page-404.html # Error 404 page | ||
| page-500.html # Error 404 page | ||
| *.html # All other HTML pages | ||
| | ||
|-- authentication/ # Handles auth routes (login and register) | ||
| | | ||
| |-- urls.py # Define authentication routes | ||
| |-- views.py # Handles login and registration | ||
| |-- forms.py # Define auth forms | ||
| | ||
|-- app/ # A simple app that serve HTML files | ||
| | | ||
| |-- views.py # Serve HTML pages for authenticated users | ||
| |-- urls.py # Define some super simple routes | ||
| | ||
|-- requirements.txt # Development modules - SQLite storage | ||
| | ||
|-- .env # Inject Configuration via Environment | ||
|-- manage.py # Start the app - Django default start script | ||
| | ||
|-- ************************************************************************ | ||
``` | ||
|
||
<br /> | ||
|
||
> The bootstrap flow | ||
- Django bootstrapper `manage.py` uses `core/settings.py` as the main configuration file | ||
- `core/settings.py` loads the app magic from `.env` file | ||
- Redirect the guest users to Login page | ||
- Unlock the pages served by *app* node for authenticated users | ||
|
||
<br /> | ||
|
||
## Deployment | ||
|
||
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/). | ||
|
||
### [Docker](https://www.docker.com/) execution | ||
--- | ||
|
||
The application can be easily executed in a docker container. The steps: | ||
|
||
> Get the code | ||
```bash | ||
$ git clone https://github.com/app-generator/boilerplate-code-django-dashboard.git | ||
$ cd boilerplate-code-django-dashboard | ||
``` | ||
|
||
> Start the app in Docker | ||
```bash | ||
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d | ||
``` | ||
|
||
Visit `http://localhost:5005` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
### [Gunicorn](https://gunicorn.org/) | ||
--- | ||
|
||
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. | ||
|
||
> Install using pip | ||
```bash | ||
$ pip install gunicorn | ||
``` | ||
> Start the app using gunicorn binary | ||
```bash | ||
$ gunicorn --bind=0.0.0.0:8001 core.wsgi:application | ||
Serving on http://localhost:8001 | ||
``` | ||
|
||
Visit `http://localhost:8001` in your browser. The app should be up & running. | ||
|
||
|
||
<br /> | ||
|
||
### [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/) | ||
--- | ||
|
||
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. | ||
|
||
> Install using pip | ||
```bash | ||
$ pip install waitress | ||
``` | ||
> Start the app using [waitress-serve](https://docs.pylonsproject.org/projects/waitress/en/stable/runner.html) | ||
```bash | ||
$ waitress-serve --port=8001 core.wsgi:application | ||
Serving on http://localhost:8001 | ||
``` | ||
|
||
Visit `http://localhost:8001` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
## Credits & Links | ||
|
||
- [Django](https://www.djangoproject.com/) - The official website | ||
- [Boilerplate Code](https://appseed.us/boilerplate-code) - Index provided by **AppSeed** | ||
- [Boilerplate Code](https://github.com/app-generator/boilerplate-code) - Index published on Github | ||
|
||
<br /> | ||
|
||
--- | ||
[Django Dashboard Boilerplate](https://appseed.us/boilerplate-code/django-dashboard) - Provided by **AppSeed** [Web App Generator](https://appseed.us/app-generator). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,4 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,8 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" | ||
|
||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,9 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" | ||
|
||
from django.apps import AppConfig | ||
|
||
class MyConfig(AppConfig): | ||
name = 'cfg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,4 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" |
Oops, something went wrong.