# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
+from django.shortcuts import get_object_or_404
from django_comments_xtd.models import XtdComment
import django_comments as comments
from django import template
from migdal import app_settings
-from migdal.models import Category
+from migdal.models import Category, Entry
register = template.Library()
'form': comments.get_form()(entry),
'next': entry.get_absolute_url(),
}
+
+
+@register.simple_tag
+def entry_url(slug, lang='pl'):
+ entry = get_object_or_404(Entry, **{'slug_%s' % lang: slug})
+ return entry.get_absolute_url()
setup(
name='django-migdal',
- version='0.6.4',
+ version='0.7.0',
author='Radek Czajka',
author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
+ maintainer='Jan Szejko',
+ maintainer_email='jan.szejko@nowoczesnapolska.org.pl',
url='',
packages=find_packages(),
package_data={'migdal': whole_trees('migdal', ['templates', 'locale'])},