-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
61 lines (46 loc) · 2.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Introduction
============
`jQuery Mobile <http://www.jquerymobile.com/>`_ is a
`jQuery <http://jquery.com/>`_ based library for touch/mobile web
applications. ``django-jqmobile`` builds on the jQuery Mobile framework to
provide easier content management with Django. ``django-jqmobile`` adds a
model for creating individually displayed screens or panels. When rendering,
the contents of the panel is inspected and other referenced panels are
rendered as well in order to combine the content and provide a more seamless
experience.
Panels
------
The ``Panel`` model consists of a unique identifier, the body of the panel, and
a flag for whether the panel can be embedded or should be loaded with an
XMLHttpRequest when requested by the user.
Recursive Rendering
-------------------
When rendering, the body of the panel is searched for anchor tags. Each anchor
destination is checked to see if it is a local URL. If it is a local URL, the
configurable list of panel resolvers is checked in order to see if it resolves
to a panel. If the panel can be embedded, the ``render`` method on the panel is
called and the results are included as a sibling in the output of the current
panel.
Installation
============
#. Install the ``django-jqmobile`` package in your preferred method: easy_install,
setup.py install, pip or buildout.
#. Add ``jqmobile`` to the list of ``INSTALLED_APPS`` in your settings file
#. Include ``jqmobile.urls`` in your project's url patterns::
urlpatterns = patterns('',
(r'', include('jqmobile.urls')),
)
Versions
--------
* jQuery Mobile 1.0 alpha 2
* jQuery 1.4.4
Additional Settings
-------------------
``JQMOBILE_BASE_IDENTIFIER``
Default ``default``. This is the identifier to use with the default URL when
using the ``jqmobile.urls`` include. Requesting '/' will load this panel
identifier.
``JQMOBILE_PANEL_RESOLVERS``
Default ``('jqmobile.resolvers.panel_model_resolver',)``. A list or tuple of
panel resolving functions in the order they should be tried. Strings can be
used to specify the resolving function or the actual functions can be entered.