builtin (4)
cycler¶
cycler(*items: Any) -> None
Cycle through values by yield them one at a time, then restarting
Example
Jinja call:
{% set row_class = cycler("odd", "even") %}
{{ row_class.next() }}
{{ row_class.next() }}
{{ row_class.next() }}
{{ row_class.current }}
odd
even
odd
even
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
|
next
¶
next() -> Any
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
709 710 711 712 713 714 715 |
|
reset
¶
reset() -> None
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
698 699 700 |
|
joiner¶
joiner(sep: str = ', ') -> None
A joining helper for templates.
Example
Jinja call:
Result: `"AB""AB" | "AB" |`
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
720 721 722 723 724 725 726 727 728 729 730 731 |
|
lipsum¶
lipsum(n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str
Generate some lorem ipsum for the template.
Example
Jinja call:
Result:<p>Imperdiet nullam iaculis elit senectus suspendisse consectetuer, hendrerit adipiscing sagittis massa egestas dis, rutrum magna etiam ac. Eleifend interdum luctus tristique, sed rhoncus metus hac nam habitasse, dictum mi condimentum hymenaeos per aptent, aenean. Litora nec diam et curae hendrerit, tellus dictum neque natoque, mattis urna potenti ultricies imperdiet, senectus leo dignissim eget torquent, in sit. Sed auctor varius accumsan, ut velit nascetur dignissim purus eleifend, non porttitor lacus elementum turpis leo urna, bibendum.</p>
<p>Arcu primis amet eros lobortis class est magna tortor, quisque vitae dapibus erat lorem maecenas, egestas urna. Imperdiet luctus class sagittis vitae, curabitur potenti eu eros, cubilia hymenaeos lectus montes, pellentesque ut congue velit. Hymenaeos habitasse commodo fringilla eget, ipsum est mi faucibus sollicitudin, eget pharetra vestibulum at feugiat. Bibendum vulputate placerat nascetur, facilisi pellentesque iaculis tristique integer, congue laoreet litora mus tempor diam, orci penatibus. Integer turpis consequat nisi ultrices cursus blandit, curae nisi laoreet magnis cubilia tempus.</p>
<p>Faucibus senectus nostra quisque molestie magna dis, montes aliquet dapibus dui ad leo, ligula egestas habitasse nec. Euismod rhoncus litora gravida congue nonummy, commodo phasellus parturient vulputate, fringilla penatibus nascetur mollis aliquet, elementum quis.</p>
<p>Volutpat iaculis tellus varius fames nisl, torquent cursus eleifend nostra orci aenean, tristique fames sodales pellentesque. Pede mus aliquam sodales inceptos aenean quam, nunc facilisis mi aliquam dapibus, malesuada lobortis ullamcorper nam curae eu, nec lacus suscipit. Auctor cum eget habitant potenti adipiscing tincidunt, neque ad metus pharetra, pede quam rhoncus cursus sagittis semper, cursus. Aliquam ac dictumst hac, velit cursus scelerisque sagittis interdum nostra egestas aenean, eros molestie inceptos nibh, volutpat. Primis felis ante vulputate, amet integer lorem scelerisque cursus, tortor hymenaeos dui consectetuer, bibendum.</p>
<p>Erat at varius habitant nibh, eu porttitor mi felis nostra, inceptos rutrum ullamcorper eu luctus, nec ipsum adipiscing metus, senectus nec taciti litora. Penatibus per massa fringilla donec nisi, cubilia magna luctus eros sagittis lacinia nec, leo tortor imperdiet felis egestas, rutrum etiam pretium. Fringilla class aliquet dolor lobortis, laoreet in sit ornare lacus eget mauris, aliquam sapien conubia porttitor a purus, natoque. Cum mattis velit euismod.</p>
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
|
namespace¶
namespace(*args: Any, **kwargs: Any) -> None
A namespace object that can hold arbitrary attributes. It may be
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/utils.py
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 |
|