- Install with pip:
pip install django-critical-css
INSTALLED_APPS = ( # ... 'django_rq', 'inline_static', 'critical', )
You can run an instance of penthouse service and add its url to settings.
PENTHOUSE_URL = 'http://penthouse:3000/'
Alternatively, you can define your custom function, which takes url and css path as arguments and returns critical css as string.
CRITICAL_CSS_BACKEND = 'function.calculating.critical.css'
- It is possible to use critical with django-cms. If you decide to do so refer to cms installation instructions.