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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_static_base-0.5.1.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_static_base-0.5.1-py3-none-any.whl (5.7 MB view details)

Uploaded Python 3

File details

Details for the file django_static_base-0.5.1.tar.gz.

File metadata

  • Download URL: django_static_base-0.5.1.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_static_base-0.5.1.tar.gz
Algorithm Hash digest
SHA256 0524381c93b41a575d1e7f79742e70dbd9d64124559346cef316ada04b8ef762
MD5 24ec06425c7a690b5396debe4cac295a
BLAKE2b-256 4a40524f819d1012b0a90eedbd1b69a517c226c3c2f5305f2f45b60ca4757f2c

See more details on using hashes here.

File details

Details for the file django_static_base-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_static_base-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0298244599fcf6641221bb36a1a799ec5ad614fbe5e44e3e16fc3c17fa2aea2
MD5 674d24756c8e08fbef33a75e513a57d7
BLAKE2b-256 259fac9c42907602c127b06a9ae5a62a4b81362cd41d26f2ed6ffb5d2ea85bc9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.2

2 files

This release

0.5.1 This release

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page