Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2Abstract
3--------
5The HTML app provides various an abstracted means of working with frameworks such as Twitter Bootstrap. It takes
6advantage of Django's standard means of overriding templates in order to provide a relatively seamless way to implement
7a given framework's specific elements.
9Additionally, the app provides various resources for working with HTML programmatically.
11This app used extensively by SuperDjango UI.
13Install
14-------
16Make sure the assets app is in `INSTALLED_APPS`:
18.. code-block:: python
20 INSTALLED_APPS = [
21 # ...
22 'superdjango.assets.apps.DefaultConfig',
23 ]
25Pick the framework you wish to use with the project. For example, to use Twitter Bootstrap:
27.. code-block:: python
29 INSTALLED_APPS = [
30 # ...
31 'superdjango.html.frameworks.bootstrap4',
32 ]
34You'll also need to add ``FORM_RENDERER`` in the ``settings.py`` file:
36.. code-block:: python
38 FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
40Usage
41-----
43After setup, using the html app is more or less automatic across all of SuperDjango.
45**Overriding Templates**
47Should you wish to override a template, the usual means is provided. For example, to override the
48``delayed_redirect.html`` template, create an app and add it to ``INSTALLED_APPS`` *above* your the install of your
49chosen framework.
51.. code-block:: python
53 INSTALLED_APPS = [
54 # ...
55 'shared.myhtml.apps.DefaultConfig',
56 'superdjango.html.frameworks.bootstrap4.apps.DefaultConfig',
57 ]
59In this example, the ``myhtml`` app should have a template at `superdjango/views/delayed_redirect.html`.
61"""
62__author__ = "Shawn Davis <shawn@superdjango.com>"
63__maintainer__ = "Shawn Davis <shawn@superdjango.com>"
64__version__ = "4.0.0-d"