Code cleanups.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-17 18:28:34 -04:00
parent f2fff77aab
commit ecdc122b15
3 changed files with 3 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.template import Library from django.template import Library
from django.utils.module_loading import import_string
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
register = Library() register = Library()
@@ -23,8 +24,4 @@ def get_form_media_js(form):
@register.simple_tag @register.simple_tag
def get_icon(icon_path): def get_icon(icon_path):
from django.utils.module_loading import import_string return import_string(icon_path).render()
icon_class = import_string(icon_path)
return icon_class.render()
#return [form.media.absolute_path(path) for path in form.media._js]

View File

@@ -26,8 +26,7 @@ from .links import (
link_about, link_check_version, link_current_user_details, link_about, link_check_version, link_current_user_details,
link_current_user_edit, link_current_user_locale_profile_edit, link_current_user_edit, link_current_user_locale_profile_edit,
link_license, link_object_error_list_clear, link_packages_licenses, link_license, link_object_error_list_clear, link_packages_licenses,
link_setup, link_support, link_tools, separator_user_label, link_setup, link_tools, separator_user_label, text_user_label
text_user_label
) )
from .literals import DELETE_STALE_UPLOADS_INTERVAL, MESSAGE_SQLITE_WARNING from .literals import DELETE_STALE_UPLOADS_INTERVAL, MESSAGE_SQLITE_WARNING

View File

@@ -1018,7 +1018,6 @@ class DocumentPageCachedImage(models.Model):
return super(DocumentPageCachedImage, self).save(*args, **kwargs) return super(DocumentPageCachedImage, self).save(*args, **kwargs)
class DocumentPageResult(DocumentPage): class DocumentPageResult(DocumentPage):
class Meta: class Meta:
ordering = ('document_version__document', 'page_number') ordering = ('document_version__document', 'page_number')