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

2 

3Abstract 

4-------- 

5 

6The assets app provides access to static files for all other SuperDjango apps. This centralized approach may have some 

7disadvantages, but it allows a single entry in ``INSTALLED_APPS`` to provide static files for *any* app, library, or 

8other resource in the SuperDjango suite. 

9 

10Install 

11------- 

12 

13Add ``'superdjango.assets.apps.DefaultConfig',`` to ``INSTALLED_APPS``. 

14 

15Usage 

16----- 

17 

18Usage is driven primarily by apps within the SuperDjango suite, but developers may wish to make use of the bundled 

19files. 

20 

21Static Files 

22............ 

23 

24The structure of static files are divided into 2 categories: ``bundled`` and ``superdjango``. 

25 

26Bundled files are included for convenience, especially during development. These files are more or less organized as 

27provided by the authors or maintainers of the package. 

28 

29.. note:: 

30 The corresponding licenses are included in the top-level `legal/` directory. See :ref:`legal`. 

31 

32Files specific to SuperDjango are located in the ``superdjango/`` sub-directory. These are first organized by the app, 

33library, or module that utilizes the component. Individual files are further organized by type, such as ``css/``, 

34``fonts/``, ``images/``, or ``js/``. 

35 

36All static files may be accessed in templates in the standard manner: 

37 

38.. code-block: html 

39 

40 {% load static %} 

41 

42 <link rel="stylesheet" href="{% static "bundled/select2/css/select2.css" %}"> 

43 <script src="{% static "bundled/select2/js/select2.js" %}"></script> 

44 

45""" 

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

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

48__version__ = "0.6.0-d" 

49 

50from .library import JavaScript, StyleSheet 

51 

52__all__ = ( 

53 "JavaScript", 

54 "StyleSheet", 

55)