Skip to content
/ sbadmin Public

Django bootstrapped template integration for Admin

License

Notifications You must be signed in to change notification settings

hygull/sbadmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbadmin (SB Admin 2, Django project with all pages integrated)

Any of the following best fits to describe this project.

Table of contents

Tech stack

Language/Framework Version End
Python 3.6.7 Backend
Django 2.2.6 Backend, Python's high level web framework
Bootstrap 4 Frontend, CSS framework

Features

  • Django templating langauge (DTL) is used for template code re-structuring.
  • Redundant code has been removed from Sb Admin 2 template pages.
  • UI code is completely separate from backend code i.e. in src/ui.
  • Urls defined in all pages are fully dynamic so changing url in urls.py will not force you to make change in templates. Just one change is enough.
  • Almost all urls can be found at src/users/urls.py which starts with /users/.
  • Only the urls related to Django admin site (starts with /admin/) and Index page (/) is defined at src/sbadmin/urls.py.
  • Views are defined at src/users/views.py , src/sbadmin/views.py.
  • Theme related code is separate from user implemented code. Also user can add his own template & static files separately.
  • Navbar has been for login/register/forgot_passord pages (These 3 extends the same base_x.html).

Templates & static files directories

  • Templates (HTML files) are under src/ui/templates.

  • All static files (JS, css, scss, images etc.) are under src/ui/static/files, which is further sub divided in 2 directories.

    Note: Here the main intention of creating resource inside app directory is to get rid of conflicts when Django searchs for static files after looking into STATICFILES_DIRS setting variable's values (i.e. paths which points to directories where Django looks for static files) in order & there are 2 files with same name in 2 different js/css/img etc. directories.

How to run?

Make sure you have

  • Python3+ installed in your system
  • virtualenv Python package is installed (It will allow you to run virtualenv command to create virtual environment)

Now, just follow the below steps to run this project.

  • git clone https://github.com/hygull/sbadmin.git
  • virtualenv venv OR python3 -m virtualenv venv OR python3.6 -m virtualenv venv etc.
  • source venv/bin/activate on Linux/MAC OS X, .\venv\Scripts\activate on Windows
  • cd sbadmin
  • pip install -r requirements.txt
  • cd src
  • python manage.py migrate
  • python manage.py runserver

Now, visit http://127.0.0.1:8000 and play. Later, you can write your own views and implement the functionality.

Screenshots

Here are few scrennshots related to the integrated theme.

Register

Register

Login

Login

Forgot Password

Forgot Password

Dashboard

Dashboard

Tables

Tables

Colors & Notifications

Colors & Notifications

Charts

Charts

Thanks for going through the documentation.