Skip to main content

django-dyncss is an extension to Django allowing to save css assets in the DB

Project description

Django DynCSS is an extension to Django which adds the possibility to store css files in the Django DB with simple versioning.

Installation

Install the latest version from pypi.python.org:

pip install django-dyncss

Install the development version by cloning the source from github.com:

pip install git+https://github.com/jcolot/django-dyncss.git

Configuration

Add the package to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'dyncss',
)

Add the url path in your main urls.py.

urlpatterns = [
    ...
    path('dyncss/', include('dyncss.urls')),
]

Usage

Create a CSS File from the Django Admin

Add a link to that file in your Django template

<link rel="stylesheet" href="dyncss/example.css">

You can also use the template tag

{% load dyncss %}

{% dyncss 'example.css' inline=True %}

The parameter inline when True allows to render the file inline within <style> tags

License

Resources

Project details


Download files

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

Source Distribution

django-dyncss-0.1.1.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

django_dyncss-0.1.1-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page