Commits

Francesco Banconi  committed a87b36f

Documentation.

  • Participants
  • Parent commits 92a7942

Comments (0)

Files changed (6)

File doc/usage.html

 <li><a class="reference internal" href="#show-more" id="id12">4.2&nbsp;&nbsp;&nbsp;show_more</a></li>
 </ul>
 </li>
-<li><a class="reference internal" href="#customization" id="id13">5&nbsp;&nbsp;&nbsp;Customization</a></li>
+<li><a class="reference internal" href="#customization" id="id13">5&nbsp;&nbsp;&nbsp;Customization</a><ul class="auto-toc">
+<li><a class="reference internal" href="#template-and-css" id="id14">5.1&nbsp;&nbsp;&nbsp;Template and css</a></li>
+</ul>
+</li>
 </ul>
 </div>
 <div class="section" id="introduction">
 </div>
 <div class="section" id="pagination">
 <h2><a class="toc-backref" href="#id9">3.5&nbsp;&nbsp;&nbsp;Pagination</a></h2>
-<p>Nothing remains but to change the page template, loading endless templatetags and
-the javascript file <em>endless.js</em> included in the distribution under <tt class="docutils literal"><span class="pre">/media/js/</span></tt>.</p>
+<p>Nothing remains but to change the page template, loading endless templatetags,
+the jQuery library and the javascript file <em>endless.js</em> included
+in the distribution under <tt class="docutils literal"><span class="pre">/media/js/</span></tt>.</p>
 <p><em>myapp/entry_index.html</em> becomes:</p>
 <pre class="literal-block">
 {% block js %}
     {{ block.super }}
+    &lt;script src=&quot;/path/to/jquery.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
     &lt;script src=&quot;/path/to/endless.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
 {% endblock %}
 
 <li><p class="first"><em>ENDLESS_PAGINATION_ORPHANS</em> (default=0):
 See django <em>Paginator</em> definition of orphans.</p>
 </li>
-<li><p class="first"><em>ENDLESS_PAGINATION_SHOW_MORE_TEMPLATE</em> (default=&quot;endless/show_more.html&quot;):
-The template used by <em>show_more</em> templatetag.
-You can provide your customized template that must meet the following rules:
-- <em>more</em> link is showed only if variable &quot;querystring&quot; is not False
-- the container (most external html element) class is <em>endless_container</em>
-- the <em>more</em> link and the loader hidden element live inside the container
-- the <em>more</em> link class is <em>endless_more</em>
-- the loader hidden element class is <em>endless_loading</em></p>
-</li>
 <li><p class="first"><em>ENDLESS_PAGINATION_LOADING</em> (default=&quot;loading&quot;):
 If you use the default <em>show_more</em> template, here you can customize
 the content of the loader hidden element
 </pre>
 </li>
 </ul>
+<div class="section" id="template-and-css">
+<h2><a class="toc-backref" href="#id14">5.1&nbsp;&nbsp;&nbsp;Template and css</a></h2>
+<p>You can override the default template for <em>show_more</em> templatetag following
+some rules:</p>
+<ul class="simple">
+<li><em>more</em> link is showed only if variable <tt class="docutils literal"><span class="pre">querystring</span></tt> is not False</li>
+<li>the container (most external html element) class is <em>endless_container</em></li>
+<li>the <em>more</em> link and the loader hidden element live inside the container</li>
+<li>the <em>more</em> link class is <em>endless_more</em></li>
+<li>the loader hidden element class is <em>endless_loading</em></li>
+</ul>
+<p>Application comes with English and Italian i18n.</p>
+</div>
 </div>
 </div>
 </body>

File doc/usage.rst

 Pagination
 ~~~~~~~~~~
 
-Nothing remains but to change the page template, loading endless templatetags and
-the javascript file *endless.js* included in the distribution under ``/media/js/``.
+Nothing remains but to change the page template, loading endless templatetags,
+the jQuery library and the javascript file *endless.js* included 
+in the distribution under ``/media/js/``.
 
 *myapp/entry_index.html* becomes::
 
     {% block js %}
         {{ block.super }}
+        <script src="/path/to/jquery.js" type="text/javascript" charset="utf-8"></script>
         <script src="/path/to/endless.js" type="text/javascript" charset="utf-8"></script>
     {% endblock %}
     
 - *ENDLESS_PAGINATION_ORPHANS* (default=0):
   See django *Paginator* definition of orphans.
 
-- *ENDLESS_PAGINATION_SHOW_MORE_TEMPLATE* (default="endless/show_more.html"):
-  The template used by *show_more* templatetag.
-  You can provide your customized template that must meet the following rules:
-  - *more* link is showed only if variable "querystring" is not False
-  - the container (most external html element) class is *endless_container*
-  - the *more* link and the loader hidden element live inside the container
-  - the *more* link class is *endless_more*
-  - the loader hidden element class is *endless_loading*
-  
 - *ENDLESS_PAGINATION_LOADING* (default="loading"):
   If you use the default *show_more* template, here you can customize
   the content of the loader hidden element
      ENDLESS_PAGINATION_LOADING = """
          <img src="/site_media/img/loader.gif" alt="loading" />
      """
+     
+Template and css
+~~~~~~~~~~~~~~~~
 
+You can override the default template for *show_more* templatetag following
+some rules:
+
+- *more* link is showed only if variable ``querystring`` is not False
+- the container (most external html element) class is *endless_container*
+- the *more* link and the loader hidden element live inside the container
+- the *more* link class is *endless_more*
+- the loader hidden element class is *endless_loading*
+
+Application comes with English and Italian i18n.

File doc/usage.wiki

 
 == 3.5   Pagination ==
 
-Nothing remains but to change the page template, loading endless templatetags and the javascript file *endless.js* included in the distribution under `/media/js/`.
+Nothing remains but to change the page template, loading endless templatetags,
+the jQuery library and the javascript file *endless.js* included 
+in the distribution under {{{/media/js/}}}.
 
 *myapp/entry_index.html* becomes:
 
 {{{
 {% block js %}
     {{ block.super }}
+    <script src="/path/to/jquery.js" type="text/javascript" charset="utf-8"></script>
     <script src="/path/to/endless.js" type="text/javascript" charset="utf-8"></script>
 {% endblock %}
 
 
  * *ENDLESS_PAGINATION_ORPHANS* (default=0): See django *Paginator* definition of orphans.
 
- * *ENDLESS_PAGINATION_SHOW_MORE_TEMPLATE* (default="endless/show_more.html"): The template used by *show_more* templatetag. You can provide your customized template that must meet the following rules: - *more* link is showed only if variable "querystring" is not False - the container (most external html element) class is *endless_container*- the *more* link and the loader hidden element live inside the container - the *more* link class is *endless_more*- the loader hidden element class is *endless_loading*
-
  * *ENDLESS_PAGINATION_LOADING* (default="loading"): If you use the default *show_more* template, here you can customize the content of the loader hidden element Html is safe here, e.g. you can show your pretty animated gif:
 
 {{{
 """
 }}}
 
+== 5.1   Template and css ==
 
+You can override the default template for *show_more* templatetag following
+some rules:
 
+ * *more* link is showed only if variable ``querystring`` is not False
+ * the container (most external html element) class is *endless_container*
+ * the *more* link and the loader hidden element live inside the container
+ * the *more* link class is *endless_more*
+ * the loader hidden element class is *endless_loading*
 
+Application comes with English and Italian i18n.
+

File endless_pagination/__init__.py

-VERSION = (0, 1)
+VERSION = (0, 2)

File endless_pagination/settings.py

 # See django *Paginator* definition of orphans.
 ORPHANS = getattr(settings, "ENDLESS_PAGINATION_ORPHANS", 0)
 
-# The template used by *show_more* templatetag.
-# You can provide your customized template that must meet the following rules:
-# - *more* link is showed only if variable "querystring" is not False
-# - the container (most external html element) class is *endless_container*
-# - the *more* link and the loader hidden element live inside the container
-# - the *more* link class is *endless_more*
-# - the loader hidden element class is *endless_loading*
-SHOW_MORE_TEMPLATE = getattr(settings, 
-    "ENDLESS_PAGINATION_SHOW_MORE_TEMPLATE", "endless/show_more.html")
-    
 # If you use the default *show_more* template, here you can customize
 # the content of the loader hidden element
 # Html is safe here, e.g. you can show your pretty animated gif:

File endless_pagination/templatetags/endless.py

         return ""
 
     
-@register.inclusion_tag(settings.SHOW_MORE_TEMPLATE, takes_context=True)
+@register.inclusion_tag("endless/show_more.html", takes_context=True)
 def show_more(context):
     """
     Show the link to get the next page in a Twitter-like pagination.