Skip to main content

Django Material BS5 PRO

Premium Django Starter coded on top of Material Dashboard 2 PRO design (Premium Version).

Django Dashboard styled with Material Dashboard2 PRO, a premium Bootstrap 5 KIT from Creative-Tim The product is designed to deliver the best possible user experience with highly customizable feature-rich pages.

v1.0.7 - release date 2024-08-13, See CHANGELOG

Features​

  • Up-to-date dependencies
  • Database: SQLite (default), PgSQL, MySql
  • Authentication
    • Session-Based authentication
    • Social Login: Github
  • User Extended profile
  • API via DRF
  • DataTables
  • Charts
  • Celery (Async Tasks)
  • File Manager
  • Docker

Django Material Dash2 PRO


Environment​

To use the starter, Python3 should be installed properly in the workstation. 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:

  • Python3 - the programming language used to code the app
  • GIT - used to clone the source code from the Github repository
  • Basic development tools (g++ compiler, python development libraries ..etc) used by Python to compile the app dependencies in your environment.
  • (Optional) Docker - a popular virtualization software

Start in Docker​

Step 1 - Download the code and unzip the sources (requires a purchase).

$ unzip django-material-dashboard2-pro.zip
$ cd django-material-dashboard2-pro

Step 2 - Start the APP in Docker

# Optional (kill all existing containers)
$ docker container kill $(docker ps -q) ; docker container rm $(docker ps -a -q) ; docker network prune -f
# Start the APP
$ docker-compose up --build

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


Manual Build​

Step 1 - Download the code and unzip the sources (requires a purchase).

$ unzip django-material-dashboard2-pro.zip
$ cd django-material-dashboard2-pro

Step 2 - Create new .env from env.sample

The meaning of each variable can be found below:

  • DEBUG: if True the app runs in develoment mode
    • For production value False should be used
  • Edit SECRET_KEY: add strong secret key

Step 3 - Activate the Virtual Environment and Install Modules

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt

Step 4 - Migrate Database (by Default SQLite is used)

$ python manage.py makemigrations
$ python manage.py migrate

Step 5 - Create Superuser

$ python manage.py createsuperuser

Step 6 - Start the App

$ python manage.py runserver

At this point, the app runs at http://127.0.0.1:8000/.


Start Celery​

  • Make sure you have a Redis Server running: redis://localhost:6379
    • $ redis-cli and type ping
  • In the base directory inside tasks_scripts folder you need to write your scripts file.
  • Run the celery command from the CLI.
$ export DJANGO_SETTINGS_MODULE="core.settings"  
$ celery -A apps.tasks worker -l info -B
  • You will see a new route Apps -> Tasks in the sidebar.
  • You can start and cancel any task from the UI.

Deploy on Render​

  • Create a Blueprint instance
  • Click New Blueprint Instance button.
  • Connect your repo which you want to deploy.
  • Fill the Service Group Name and click on Update Existing Resources button.
  • After that your deployment will start automatically.

At this point, the product should be LIVE.

Resources​