Source

fat-po-editor / fat / fat_po_editor / templatetags / repository.py

Full commit
# -*- coding: utf-8 -*-

from django import template

register = template.Library()

@register.inclusion_tag('fat_po_editor/repositories_list.html', takes_context=True)
def repositories_list(context, repositories):
    from fat_po_editor.forms import RepositoryForm
    
    add_repo_form = RepositoryForm()
    
    return {'repositories': repositories,
            'STATIC_URL': context['STATIC_URL'],
            'add_repo_form': add_repo_form}