Code cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.template import Library
|
||||
from django.utils.module_loading import import_string
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
register = Library()
|
||||
@@ -23,8 +24,4 @@ def get_form_media_js(form):
|
||||
|
||||
@register.simple_tag
|
||||
def get_icon(icon_path):
|
||||
from django.utils.module_loading import import_string
|
||||
icon_class = import_string(icon_path)
|
||||
return icon_class.render()
|
||||
#return [form.media.absolute_path(path) for path in form.media._js]
|
||||
|
||||
return import_string(icon_path).render()
|
||||
|
||||
Reference in New Issue
Block a user