This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- array input --> | |
<?php | |
$max = isset($field['max']) && (int) $field['max'] > 0 ? $field['max'] : -1; | |
$min = isset($field['min']) && (int) $field['min'] > 0 ? $field['min'] : -1; | |
$item_name = strtolower(isset($field['entity_singular']) && !empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']); | |
$items = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' )); | |
// make sure not matter the attribute casting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
from django.template.loader import get_template | |
from django.template.loader_tags import BlockNode, ExtendsNode | |
register = template.Library() | |
@register.simple_tag(takes_context=True) | |
def reblock(context, block_name): | |
""" | |
Renders a specific block from the current template or its parent templates. |
OlderNewer