Django's application to serve up-to-date common static files (JQuery, Bootstrap, Plugins, ...) as "base" static directory
Project description
django-static-base 
GitHub

Test

Check Demo Project
- Check the demo repo on GitHub
Requirements
- Python 3.8+ supported.
- Django 4.2+ supported.
Setup
-
Install from pip:
pip install django-static-base
-
Add
'static_base'to yourINSTALLED_APPSsetting.INSTALLED_APPS = [ # ...other apps "static_base" ]
-
Add the following pre-requisites to your
base.htmltemplate<html> <head> ... <link rel="stylesheet" type="text/css" href="{% static 'base/css/bootstrap.css' %}"> ... </head> <body> ... <script type="text/javascript" src="{% static 'base/js/jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'base/js/bootstrap.min.js' %}"></script> <script type="text/javascript" src="{% static 'base/js/plugins/lazysizes.min.js' %}" async></script> ... <script type="module" src="{% static 'base/js/plugins/instantpage.min.js' %}" defer></script> </body> </html>
-
Add all your needed plugins or customization to your
base.htmltemplate or sub-templates used by your project<html> <head> ... <link rel="stylesheet" type="text/css" href="{% static 'base/css/plugins/jquery.smartmenus.bootstrap-4.css' %}"> ... <link rel="stylesheet" type="text/css" href="{% static 'base/css/style-btn.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'base/css/color/blue.css' %}"> ... <link rel="stylesheet" type="text/css" href="{% static 'base/css/custom.css' %}"> ... </head> <body> ... <script type="text/javascript" src="{% static 'base/js/jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'base/js/bootstrap.min.js' %}"></script> ... <script type="module" src="{% static 'base/js/plugins/instantpage.min.js' %}" defer></script> </body> </html>
Run Example Project
git clone --depth=50 --branch=django-static-base https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver
Now browser the app @ http://127.0.0.1:8000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_static_base-0.4.2.tar.gz.
File metadata
- Download URL: django_static_base-0.4.2.tar.gz
- Upload date:
- Size: 5.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54a70c37e9e6f2d9de4c65ee5c31e3166f443f276f0bebe52435bb5148b1da01
|
|
| MD5 |
12547082879d4d1c4e5bf1544f4d58c1
|
|
| BLAKE2b-256 |
68dbbcaad436d856fc63d0c01e73f2088f13240c900063d64750873eaf4da21a
|
File details
Details for the file django_static_base-0.4.2-py2.py3-none-any.whl.
File metadata
- Download URL: django_static_base-0.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.6 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4ae18ded8a46b2fb252ee124c169c5525bf5cb1ad1c88abcf6e75eda3c05e7c
|
|
| MD5 |
d08fdde2828cecaef7c2ad4f7a7e6008
|
|
| BLAKE2b-256 |
ba2a5e2b9a8547f173dbe4b77014fd3f79e21820341f200b9aa212cabce30b94
|