Hide keyboard shortcuts

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-------- 

4 

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. 

8 

9Additionally, the app provides various resources for working with HTML programmatically. 

10 

11This app used extensively by SuperDjango UI. 

12 

13Install 

14------- 

15 

16Make sure the assets app is in `INSTALLED_APPS`: 

17 

18.. code-block:: python 

19 

20 INSTALLED_APPS = [ 

21 # ... 

22 'superdjango.assets.apps.DefaultConfig', 

23 ] 

24 

25Pick the framework you wish to use with the project. For example, to use Twitter Bootstrap: 

26 

27.. code-block:: python 

28 

29 INSTALLED_APPS = [ 

30 # ... 

31 'superdjango.html.frameworks.bootstrap4', 

32 ] 

33 

34You'll also need to add ``FORM_RENDERER`` in the ``settings.py`` file: 

35 

36.. code-block:: python 

37 

38 FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' 

39 

40Usage 

41----- 

42 

43After setup, using the html app is more or less automatic across all of SuperDjango. 

44 

45**Overriding Templates** 

46 

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. 

50 

51.. code-block:: python 

52 

53 INSTALLED_APPS = [ 

54 # ... 

55 'shared.myhtml.apps.DefaultConfig', 

56 'superdjango.html.frameworks.bootstrap4.apps.DefaultConfig', 

57 ] 

58 

59In this example, the ``myhtml`` app should have a template at `superdjango/views/delayed_redirect.html`. 

60 

61""" 

62__author__ = "Shawn Davis <shawn@superdjango.com>" 

63__maintainer__ = "Shawn Davis <shawn@superdjango.com>" 

64__version__ = "4.0.0-d"