Skip to main content

Django Light Bootstrap

Open-source Django starter coded on top Light Bootstrap Dashboard design (free version).

Light Bootstrap Dashboard is a Bootstrap 4 admin dashboard template designed to be beautiful and simple. It is built on top of Bootstrap 4 and it is fully responsive. It can be used to create admin panels, project management systems, web applications backend, CMS, or CRM.

v1.0.4 - release date 2022-06-11

✅ Features​

  • UI Kit: BS4 Design from Creative-Tim
  • SQLite Database, Django Native ORM
  • Session-Based Authentication, Forms validation
  • Deployment scripts: Docker, Gunicorn/Nginx

Light Bootstrap Dashboard - Starter generated by AppSeed.

✅ 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 from the GH repository (using GIT)

$ git clone https://github.com/app-generator/django-light-bootstrap-dashboard.git
$ cd django-light-bootstrap-dashboard

👉 Step 2 - Start the APP in Docker

$ docker-compose up --build

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

✅ Manual Build​

Download the code

$ git clone https://github.com/app-generator/django-light-bootstrap-dashboard.git
$ cd django-light-bootstrap-dashboard

👉 Set Up for Unix, MacOS​

Install modules via VENV

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

Set Up Database

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

Start the app

$ python manage.py runserver

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

👉 Set Up for Windows​

Install modules via VENV (windows)

$ virtualenv env
$ .\env\Scripts\activate
$ pip3 install -r requirements.txt

Set Up Database

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

Start the app

$ python manage.py runserver

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

✅ Manage App Users​

By default, the starter is not provided with users. To access the private pages and the admin section (reserved for superusers) follow up the next sections.

👉 Create Superusers​

To access the admin section, Django requires superuser privilegies. Let's create a new superuser and access the admin section of the project:

$ python manage.py createsuperuser

Once the superuser is successfully created, we can access the admin section:

http://localhost:8000/admin/ (make sure you have a / at the end).

👉 Create (Ordinary) Users​

By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up:

  • Start the app via python manage.py runserver
  • Access the registration page and create a new user:
    • http://127.0.0.1:8000/register/
  • Access the sign in page and authenticate
    • http://127.0.0.1:8000/login/

✅ Codebase Structure​

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

< PROJECT ROOT >
|
|-- core/ # Implements app configuration
| |-- settings.py # Defines Global Settings
| |-- wsgi.py # Start the app in production
| |-- urls.py # Define URLs served by all apps/nodes
|
|-- apps/
| |
| |-- home/ # A simple app that serve HTML files
| | |-- views.py # Serve HTML pages for authenticated users
| | |-- urls.py # Define some super simple routes
| |
| |-- authentication/ # Handles auth routes (login and register)
| | |-- urls.py # Define authentication routes
| | |-- views.py # Handles login and registration
| | |-- forms.py # Define auth forms (login and register)
| |
| |-- static/
| | |-- <css, JS, images> # CSS files, Javascripts files
| |
| |-- templates/ # Templates used to render pages
| |-- includes/ # HTML chunks and components
| | |-- navigation.html # Top menu component
| | |-- footer.html # App Footer
| | |-- scripts.html # Scripts common to all pages
| |
| |-- layouts/ # Master pages
| | |-- base.html # Used by common pages
| |
| |-- accounts/ # Authentication pages
| | |-- login.html # Login page
| | |-- register.html # Register page
| |
| |-- home/ # UI Kit Pages
| |-- index.html # Index page
| |-- page-404.html # 404 page
| |-- *.html # All other pages
|
|-- requirements.txt # Development modules - SQLite storage
|
|-- .env # Inject Configuration via Environment
|-- manage.py # Start the app - Django default start script
|
|-- ************************************************************************

✅ Resources​