"djadmin2theme_default" should not be hard-coded in templatetags.

This commit is contained in:
Germano Gabbianelli 2013-11-20 16:50:52 +01:00
parent 09fcceef13
commit 4a4b11176e

View file

@ -7,7 +7,7 @@ from datetime import date, time, datetime
from django import template
from django.db.models.fields import FieldDoesNotExist
from .. import utils, renderers, models
from .. import utils, renderers, models, settings
register = template.Library()
@ -146,8 +146,9 @@ def render(context, model_instance, attribute_name):
return renderer(value, field)
@register.inclusion_tag('djadmin2theme_default/includes/history.html',
takes_context=True)
@register.inclusion_tag(
settings.ADMIN2_THEME_DIRECTORY + '/includes/history.html',
takes_context=True)
def action_history(context):
actions = models.LogEntry.objects.filter(user__pk=context['user'].pk)
return {'actions': actions}