# django-static-base [![PyPi license](https://img.shields.io/pypi/l/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi status](https://img.shields.io/pypi/status/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi version](https://img.shields.io/pypi/v/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi python version](https://img.shields.io/pypi/pyversions/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi downloads](https://img.shields.io/pypi/dm/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi downloads](https://img.shields.io/pypi/dw/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
[![PyPi downloads](https://img.shields.io/pypi/dd/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)
## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-static-base.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-static-base.svg)
## Test [![codecov.io](https://codecov.io/github/DLRSP/django-static-base/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-static-base?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-static-base/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-static-base/main) [![gitthub.com](https://github.com/DLRSP/django-static-base/actions/workflows/ci.yaml/badge.svg)](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/f0/4f/7c1956f89969bdc0dd14d5dda38ace4660638a16e5e3981af7726c1aa5af/django_static_base-0.3.4.tar.gz",
"platform": null,
"description": "# django-static-base [![PyPi license](https://img.shields.io/pypi/l/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n\n[![PyPi status](https://img.shields.io/pypi/status/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n[![PyPi version](https://img.shields.io/pypi/v/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n[![PyPi python version](https://img.shields.io/pypi/pyversions/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n[![PyPi downloads](https://img.shields.io/pypi/dm/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n[![PyPi downloads](https://img.shields.io/pypi/dw/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n[![PyPi downloads](https://img.shields.io/pypi/dd/django-static-base.svg)](https://pypi.python.org/pypi/django-static-base)\n\n## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-static-base.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-static-base.svg)\n\n## Test [![codecov.io](https://codecov.io/github/DLRSP/django-static-base/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-static-base?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-static-base/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-static-base/main) [![gitthub.com](https://github.com/DLRSP/django-static-base/actions/workflows/ci.yaml/badge.svg)](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.3.4",
"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": "e9f32de40ec4721cb603adf9951b95dc7c2600e57aa6fb667c6f5a41a80f161b",
"md5": "60478ed440ea8105c12db2d40d4964af",
"sha256": "90193867a41621e6ab44af1676f0415ce417a68954c3e2da2f3fa8480de8a5e8"
},
"downloads": -1,
"filename": "django_static_base-0.3.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "60478ed440ea8105c12db2d40d4964af",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 5619315,
"upload_time": "2024-12-08T20:51:27",
"upload_time_iso_8601": "2024-12-08T20:51:27.707083Z",
"url": "https://files.pythonhosted.org/packages/e9/f3/2de40ec4721cb603adf9951b95dc7c2600e57aa6fb667c6f5a41a80f161b/django_static_base-0.3.4-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f04f7c1956f89969bdc0dd14d5dda38ace4660638a16e5e3981af7726c1aa5af",
"md5": "d1bf465ca8ddfb643cdb5dd6c74d771b",
"sha256": "8fb780dc5e1aea3b615e24258bf4e59ed3907fa8231be61d55cbc6bbb16278cf"
},
"downloads": -1,
"filename": "django_static_base-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "d1bf465ca8ddfb643cdb5dd6c74d771b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5475135,
"upload_time": "2024-12-08T20:51:30",
"upload_time_iso_8601": "2024-12-08T20:51:30.034382Z",
"url": "https://files.pythonhosted.org/packages/f0/4f/7c1956f89969bdc0dd14d5dda38ace4660638a16e5e3981af7726c1aa5af/django_static_base-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 20:51:30",
"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"
}