项目作者: app-generator

项目描述 :
Django Dashboard - Azia PRO | AppSeed
高级语言:
项目地址: git://github.com/app-generator/django-dashboard-azia-pro.git
创建时间: 2020-05-23T05:38:58Z
项目社区:https://github.com/app-generator/django-dashboard-azia-pro

开源协议:Other

下载


Django Azia PRO

Admin dashboard generated by AppSeed in Django Framework. Designed based on the Bootstrap framework, Azia PRO is a powerful, feature-rich, and super flexible admin dashboard template. It serves as the perfect starting point for both simple and complex web development projects. It features a well-designed dashboard with several neatly arranged components and essential elements.


Features

  • Up-to-date dependencies: Django 3.2.6 LTS
  • SCSS compilation via Gulp
  • UI-Ready app, SQLite Database, Django Native ORM
  • Modular design, clean code-base
  • Session-Based Authentication, Forms validation
  • Deployment scripts: Docker, Gunicorn / Nginx
  • Support via Github (issues tracker) and Discord.


Links


Quick Start in Docker

Get the code

  1. $ git clone https://github.com/app-generator/priv-django-azia-dashboard-pro.git
  2. $ cd priv-django-azia-dashboard-pro

Start the app in Docker

  1. $ docker-compose pull # download dependencies
  2. $ docker-compose build # local set up
  3. $ docker-compose up -d # start the app

Visit http://localhost:85 in your browser. The app should be up & running.


Django Azia PRO - Template project provided by AppSeed.


How to use it

  1. $ # Get the code
  2. $ git clone https://github.com/app-generator/priv-django-azia-dashboard-pro.git
  3. $ cd priv-django-azia-dashboard-pro
  4. $
  5. $ # Virtualenv modules installation (Unix based systems)
  6. $ virtualenv env
  7. $ source env/bin/activate
  8. $
  9. $ # Virtualenv modules installation (Windows based systems)
  10. $ # virtualenv env
  11. $ # .\env\Scripts\activate
  12. $
  13. $ # Install modules - SQLite Storage
  14. $ pip3 install -r requirements.txt
  15. $
  16. $ # Create tables
  17. $ python manage.py makemigrations
  18. $ python manage.py migrate
  19. $
  20. $ # Start the application (development mode)
  21. $ python manage.py runserver # default port 8000
  22. $
  23. $ # Start the app - custom port
  24. $ # python manage.py runserver 0.0.0.0:<your_port>
  25. $
  26. $ # 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.


Code-base structure

The project is coded using a simple and intuitive structure presented bellow:

  1. < PROJECT ROOT >
  2. |
  3. |-- core/ # Implements app configuration
  4. | |-- settings.py # Defines Global Settings
  5. | |-- wsgi.py # Start the app in production
  6. | |-- urls.py # Define URLs served by all apps/nodes
  7. |
  8. |-- apps/
  9. | |
  10. | |-- home/ # A simple app that serve HTML files
  11. | | |-- views.py # Serve HTML pages for authenticated users
  12. | | |-- urls.py # Define some super simple routes
  13. | |
  14. | |-- authentication/ # Handles auth routes (login and register)
  15. | | |-- urls.py # Define authentication routes
  16. | | |-- views.py # Handles login and registration
  17. | | |-- forms.py # Define auth forms (login and register)
  18. | |
  19. | |-- static/
  20. | | |-- <css, JS, images> # CSS files, Javascripts files
  21. | |
  22. | |-- templates/ # Templates used to render pages
  23. | |-- includes/ # HTML chunks and components
  24. | | |-- navigation.html # Top menu component
  25. | | |-- sidebar.html # Sidebar component
  26. | | |-- footer.html # App Footer
  27. | | |-- scripts.html # Scripts common to all pages
  28. | |
  29. | |-- layouts/ # Master pages
  30. | | |-- base-fullscreen.html # Used by Authentication pages
  31. | | |-- base.html # Used by common pages
  32. | |
  33. | |-- accounts/ # Authentication pages
  34. | | |-- login.html # Login page
  35. | | |-- register.html # Register page
  36. | |
  37. | |-- home/ # UI Kit Pages
  38. | |-- index.html # Index page
  39. | |-- 404-page.html # 404 page
  40. | |-- *.html # All other pages
  41. |
  42. |-- requirements.txt # Development modules - SQLite storage
  43. |
  44. |-- .env # Inject Configuration via Environment
  45. |-- manage.py # Start the app - Django default start script
  46. |
  47. |-- ************************************************************************


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


Recompile CSS

To recompile SCSS files, follow this setup:


Step #1 - Install tools

  • NodeJS 12.x or higher
  • Gulp - globally
    • npm install -g gulp-cli
  • Yarn (optional)


Step #2 - Change the working directory to assets folder

  1. $ cd apps/static/assets


Step #3 - Install modules (this will create a classic node_modules directory)

  1. $ npm install
  2. // OR
  3. $ yarn


Step #4 - Edit & Recompile SCSS files

  1. $ gulp scss

The generated file is saved in static/assets/css directory.


Deployment

The app is provided with a basic configuration to be executed in Docker, Gunicorn, and Waitress.

Gunicorn


Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX.

Install using pip

  1. $ pip install gunicorn

Start the app using gunicorn binary

  1. $ gunicorn --bind=0.0.0.0:8001 core.wsgi:application
  2. Serving on http://localhost:8001

Visit http://localhost:8001 in your browser. The app should be up & running.


Waitress


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

  1. $ pip install waitress

Start the app using waitress-serve

  1. $ waitress-serve --port=8001 core.wsgi:application
  2. Serving on http://localhost:8001

Visit http://localhost:8001 in your browser. The app should be up & running.




Django Azia PRO - Provided by AppSeed App Generator.