Skip to main content

django-static-base PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Docs

Check Demo Project

  • Check the demo repo on GitHub

Requirements

  • Python 3.9+ supported.
  • Django 4.2+ supported.

Setup

  1. Install from pip:

    pip install django-static-base
    
  2. Add 'static_base' to your INSTALLED_APPS setting.

    INSTALLED_APPS = [
        # ...other apps
        "static_base"
    ]
    
  3. Add the following pre-requisites to your base.html template

    <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>
    <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>
    
  5. Optional — Material Dashboard (Creative Tim v1.1.1). Same layout as Bootstrap: theme under base/css + base/js; helpers under base/js/plugins/.

    <link rel="stylesheet" href="{% static 'base/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'base/css/material-dashboard.css' %}">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons">
    <script src="{% static 'base/js/jquery.min.js' %}"></script>
    <script src="{% static 'base/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'base/js/material.min.js' %}"></script>
    <script src="{% static 'base/js/plugins/chartist.min.js' %}"></script>
    <script src="{% static 'base/js/plugins/bootstrap-notify.js' %}"></script>
    <script src="{% static 'base/js/material-dashboard.js' %}"></script>
    

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

Metadata

Release files for django-static-base 0.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-static-base 0.5.6
File Size Uploaded Provenance Actions
django_static_base-0.5.6.tar.gz 5.6 MB Without provenance Details for django_static_base-0.5.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-static-base 0.5.6
File Interpreter ABI Platform Actions
django_static_base-0.5.6-py3-none-any.whl Python 3 none any Details for django_static_base-0.5.6-py3-none-any.whl

Total release size: 11.3 MB

Release files / django_static_base-0.5.6.tar.gz

Download URL django_static_base-0.5.6.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
fec5f141e8ca2034abd55f47a289847c1d3c4cae078410847e91cb0e5bda8553
BLAKE2b-256 checksum
How to use checksums
c42dbba9a21af0c7f11b946a8fd428598a99625abe4babfe842230d70bbf65f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / django_static_base-0.5.6-py3-none-any.whl

Download URL django_static_base-0.5.6-py3-none-any.whl
Size 5.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
da74ef2617ec049abaca855400e48cfd1bbe1a475a2f2b16f3e858267dd95973
BLAKE2b-256 checksum
How to use checksums
a2d9ddaa06dde8dc2210e95c38f5a7a89ae4f48b65deaeb78787cacf196468ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for django-static-base 0.5.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page