# django-static-base [](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
[](https://pypi.python.org/pypi/django-static-base)
## GitHub  
## Test [](https://codecov.io/github/DLRSP/django-static-base?branch=main) [](https://results.pre-commit.ci/latest/github/DLRSP/django-static-base/main) [](https://github.com/DLRSP/django-static-base/actions/workflows/ci.yaml)
## Check Demo Project
* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-static-base)
## Requirements
- Python 3.8+ supported.
- Django 4.2+ supported.
## Setup
1. Install from **pip**:
```shell
pip install django-static-base
```
2. Add `'static_base'` to your `INSTALLED_APPS` setting.
``` python title="settings.py"
INSTALLED_APPS = [
# ...other apps
"static_base"
]
```
3. Add the following pre-requisites to your `base.html` template
``` html title="base.html"
<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>
```
4. Add all your needed plugins or customization to your `base.html` template or sub-templates used by your project
``` html title="base.html"
<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
```shell
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
Raw data
{
"_id": null,
"home_page": "https://github.com/DLRSP/django-static-base",
"name": "django-static-base",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "django",
"author": "DLRSP",
"author_email": "dlrsp.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/68/db/bcaad436d856fc63d0c01e73f2088f13240c900063d64750873eaf4da21a/django_static_base-0.4.2.tar.gz",
"platform": null,
"description": "# django-static-base [](https://pypi.python.org/pypi/django-static-base)\n\n[](https://pypi.python.org/pypi/django-static-base)\n[](https://pypi.python.org/pypi/django-static-base)\n[](https://pypi.python.org/pypi/django-static-base)\n[](https://pypi.python.org/pypi/django-static-base)\n[](https://pypi.python.org/pypi/django-static-base)\n[](https://pypi.python.org/pypi/django-static-base)\n\n## GitHub  \n\n## Test [](https://codecov.io/github/DLRSP/django-static-base?branch=main) [](https://results.pre-commit.ci/latest/github/DLRSP/django-static-base/main) [](https://github.com/DLRSP/django-static-base/actions/workflows/ci.yaml)\n\n## Check Demo Project\n* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-static-base)\n\n## Requirements\n- Python 3.8+ supported.\n- Django 4.2+ supported.\n\n## Setup\n1. Install from **pip**:\n ```shell\n pip install django-static-base\n ```\n\n2. Add `'static_base'` to your `INSTALLED_APPS` setting.\n\n ``` python title=\"settings.py\"\n INSTALLED_APPS = [\n # ...other apps\n \"static_base\"\n ]\n ```\n\n3. Add the following pre-requisites to your `base.html` template\n\n ``` html title=\"base.html\"\n <html>\n <head>\n ...\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'base/css/bootstrap.css' %}\">\n ...\n </head>\n <body>\n ...\n <script type=\"text/javascript\" src=\"{% static 'base/js/jquery.min.js' %}\"></script>\n <script type=\"text/javascript\" src=\"{% static 'base/js/bootstrap.min.js' %}\"></script>\n <script type=\"text/javascript\" src=\"{% static 'base/js/plugins/lazysizes.min.js' %}\" async></script>\n ...\n <script type=\"module\" src=\"{% static 'base/js/plugins/instantpage.min.js' %}\" defer></script>\n </body>\n </html>\n ```\n\n4. Add all your needed plugins or customization to your `base.html` template or sub-templates used by your project\n\n ``` html title=\"base.html\"\n <html>\n <head>\n ...\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'base/css/plugins/jquery.smartmenus.bootstrap-4.css' %}\">\n ...\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'base/css/style-btn.css' %}\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'base/css/color/blue.css' %}\">\n ...\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'base/css/custom.css' %}\">\n ...\n </head>\n <body>\n ...\n <script type=\"text/javascript\" src=\"{% static 'base/js/jquery.min.js' %}\"></script>\n <script type=\"text/javascript\" src=\"{% static 'base/js/bootstrap.min.js' %}\"></script>\n ...\n <script type=\"module\" src=\"{% static 'base/js/plugins/instantpage.min.js' %}\" defer></script>\n </body>\n </html>\n ```\n\n## Run Example Project\n\n```shell\ngit clone --depth=50 --branch=django-static-base https://github.com/DLRSP/example.git DLRSP/example\ncd DLRSP/example\npython manage.py runserver\n```\n\nNow browser the app @ http://127.0.0.1:8000\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Django's application to serve up-to-date common static files (JQuery, Bootstrap, Plugins, ...) as \"base\" static directory",
"version": "0.4.2",
"project_urls": {
"Documentation": "https://dlrsp.github.io/django-static-base/",
"Homepage": "https://github.com/DLRSP/django-static-base",
"Source": "https://github.com/DLRSP/django-static-base",
"Tracker": "https://github.com/DLRSP/django-static-base/issues"
},
"split_keywords": [
"django"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba2a5e2b9a8547f173dbe4b77014fd3f79e21820341f200b9aa212cabce30b94",
"md5": "d08fdde2828cecaef7c2ad4f7a7e6008",
"sha256": "c4ae18ded8a46b2fb252ee124c169c5525bf5cb1ad1c88abcf6e75eda3c05e7c"
},
"downloads": -1,
"filename": "django_static_base-0.4.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "d08fdde2828cecaef7c2ad4f7a7e6008",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 5626798,
"upload_time": "2024-12-29T22:56:09",
"upload_time_iso_8601": "2024-12-29T22:56:09.783439Z",
"url": "https://files.pythonhosted.org/packages/ba/2a/5e2b9a8547f173dbe4b77014fd3f79e21820341f200b9aa212cabce30b94/django_static_base-0.4.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "68dbbcaad436d856fc63d0c01e73f2088f13240c900063d64750873eaf4da21a",
"md5": "12547082879d4d1c4e5bf1544f4d58c1",
"sha256": "54a70c37e9e6f2d9de4c65ee5c31e3166f443f276f0bebe52435bb5148b1da01"
},
"downloads": -1,
"filename": "django_static_base-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "12547082879d4d1c4e5bf1544f4d58c1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5481083,
"upload_time": "2024-12-29T22:56:13",
"upload_time_iso_8601": "2024-12-29T22:56:13.180241Z",
"url": "https://files.pythonhosted.org/packages/68/db/bcaad436d856fc63d0c01e73f2088f13240c900063d64750873eaf4da21a/django_static_base-0.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-29 22:56:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DLRSP",
"github_project": "django-static-base",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-static-base"
}