pypage 2.2.0__py3-none-any.whl → 2.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pypage-2.2.0.dist-info → pypage-2.2.1.dist-info}/METADATA +16 -3
- pypage-2.2.1.dist-info/RECORD +7 -0
- pypage.py +1 -1
- pypage-2.2.0.dist-info/RECORD +0 -7
- {pypage-2.2.0.dist-info → pypage-2.2.1.dist-info}/WHEEL +0 -0
- {pypage-2.2.0.dist-info → pypage-2.2.1.dist-info}/entry_points.txt +0 -0
- {pypage-2.2.0.dist-info → pypage-2.2.1.dist-info}/licenses/LICENSE.txt +0 -0
- {pypage-2.2.0.dist-info → pypage-2.2.1.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pypage
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.1
|
4
4
|
Summary: Light-weight Python Templating Engine
|
5
5
|
Home-page: https://github.com/arjun-menon/pypage
|
6
|
-
Download-URL: https://github.com/arjun-menon/pypage/archive/v2.2.
|
6
|
+
Download-URL: https://github.com/arjun-menon/pypage/archive/v2.2.1.tar.gz
|
7
7
|
Author: Arjun G. Menon
|
8
8
|
Author-email: contact@arjungmenon.com
|
9
9
|
License: Apache-2.0
|
@@ -341,10 +341,23 @@ tag:
|
|
341
341
|
hello {{"bob"}}
|
342
342
|
{% %}
|
343
343
|
|
344
|
-
The above
|
344
|
+
The tag above will not yield any output, but rather a new variable ``x``
|
345
345
|
will be created that captures the output of everything enclosed by it
|
346
346
|
(which in this case is ``"hello bob"``).
|
347
347
|
|
348
|
+
Function Blocks
|
349
|
+
^^^^^^^^^^^^^^^
|
350
|
+
|
351
|
+
You can define functions using the ``def`` tag:
|
352
|
+
|
353
|
+
.. code:: python
|
354
|
+
|
355
|
+
{% def anchor name href %}
|
356
|
+
<a href="{{href}}">{{name}}</a>
|
357
|
+
{% %}
|
358
|
+
|
359
|
+
The tag above will not yield any output, but rather create a new function ``anchor`` that behaves like a function, and returns the output of everything enclosed by it, with the named positional arguments injected (in an effective stacked local scope) as expected. In this example, we can invoke it with ``{{ anchor('Wikipedia', 'https://en.wikipedia.org') }}``.
|
360
|
+
|
348
361
|
Finer Details
|
349
362
|
-------------
|
350
363
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
pypage.py,sha256=70F8Lg3KOyGVeHCJIvCGY3o223EQp1Pvy3qDA5vI7zo,30890
|
2
|
+
pypage-2.2.1.dist-info/licenses/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
3
|
+
pypage-2.2.1.dist-info/METADATA,sha256=tDgfsis6WJfZ904RMOtsaH5Fa94CKlxiAj3AIvC1OUU,18890
|
4
|
+
pypage-2.2.1.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
5
|
+
pypage-2.2.1.dist-info/entry_points.txt,sha256=iHPN6EfIUdv-njh8GV04yDTzkcCLGNcXvdbA43s_8mo,39
|
6
|
+
pypage-2.2.1.dist-info/top_level.txt,sha256=8AAB15dVQEt9xcwH_eLcVUZEbFlc__81RA5mOrYtJiQ,7
|
7
|
+
pypage-2.2.1.dist-info/RECORD,,
|
pypage.py
CHANGED
pypage-2.2.0.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
pypage.py,sha256=s6OuUUo_nZjpS9aZFaXMBXlUvBUDSiF_3DzIoaE2uW4,30890
|
2
|
-
pypage-2.2.0.dist-info/licenses/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
3
|
-
pypage-2.2.0.dist-info/METADATA,sha256=GDhXXdpQcCAnSziU-5_Z9P1QujNlnSFUAY9sXggefWU,18347
|
4
|
-
pypage-2.2.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
5
|
-
pypage-2.2.0.dist-info/entry_points.txt,sha256=iHPN6EfIUdv-njh8GV04yDTzkcCLGNcXvdbA43s_8mo,39
|
6
|
-
pypage-2.2.0.dist-info/top_level.txt,sha256=8AAB15dVQEt9xcwH_eLcVUZEbFlc__81RA5mOrYtJiQ,7
|
7
|
-
pypage-2.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|