Django Gradient Able#

Open-Source Django Template built with a minimum set of features on top of Gradient Able, a modern dashboard design from CodedThemes. This template can be used to start a new project quickly by adding new features on top of the existing ones or simply for learning purposes.

Features#

  • Bootstrap 4 Styling

  • Session-based Authentication

  • API Generator

  • DataTables

  • DB Persistence: SQLite

  • Docker

  • CI/CD integration for Render

Gradient Able - Open-Source Seed project generated by AppSeed.

Prerequisites#

A few tools need to be installed in the system to use the starter efficiently:

  • Python

  • A modern code editor like VsCode, or Sublime

  • (optional) GIT - for pulling the source code and work under a version control system

  • (optional) Docker for isolated execution

  • (optional) DB Servers: - MySql - PostgreSQL

Download Sources#

The product can be downloaded from the official page or directly from GitHub by accessing the repository:

To download the sources from GitHub using GIT, open a terminal and execute a git clone command. Once the download is complete, the project can be opened in VsCode.

git clone https://github.com/app-generator/django-gradient-able.git   # Download sources from GitHub
code django-gradient-able                                             # Open project in VsCode

Start in Docker#

Te fastest way to see the product running in the browser is to start Django Gradient Able in Docker:

docker-compose up --build

If Docker is properly installed in the system, you can visit the browser at http://localhost:5085. Gradient Able should be up and running.

Manual Build#

This section presents all steps to start Django Gradient Able manually.

virtualenv env                      # Create a Virtual Environment
source env/bin/activate             # Activate the environment
pip install -r requirements.txt     # Install modules
python manage.py makemigrations     # Migrate DataBase (generate tables)
python manage.py migrate            # Apply Changes on Database

The project environment and database are ready to be used. The last thing is to start the application:

python manage.py runserver          # Starts on default PORT 8000
python manage.py runserver 8999     # Starts on PORT 8999 (custom port)

By default Django starts on port 8000 but this can be easily changed by adding the PORT number as argument. At this point, the app runs at http://127.0.0.1:8000/

Codebase#

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

  • Core: holds the project settings

  • Home: the application that integrates the Gradient Able Design

  • Api: the generated API

< PROJECT ROOT >
  |
  |-- core/
  |    |-- settings.py          # Project Configuration
  |    |-- urls.py              # Project Routing
  |    |-- views.py             # Controllers & Views
  |
  |-- api/
  |    |-- serializers.py       # Project Configuration
  |    |-- urls.py              # Project Routing
  |
  |-- home/
  |    |-- views.py             # APP Views
  |    |-- urls.py              # APP Routing
  |    |-- models.py            # APP Models
  |    |-- tests.py             # Tests
  |
  |-- templates/
  |    |-- layouts              # Master pages
  |    |-- includes             # Components
  |    |-- pages                # Pages
  |
  |-- requirements.txt          # Project Dependencies
  |
  |-- env.sample                # ENV Configuration (default values)
  |-- manage.py                 # Start the app - Django default start script
  |
  |-- ************************************************************************