Move tag literals to their own module
This commit is contained in:
41
apps/tags/literals.py
Normal file
41
apps/tags/literals.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
COLOR_RED = u'red'
|
||||
COLOR_BLUE = u'blu'
|
||||
COLOR_MAGENTA = u'mag'
|
||||
COLOR_CYAN = u'cya'
|
||||
COLOR_YELLOW = u'yel'
|
||||
COLOR_GREENYELLOW = u'gry'
|
||||
COLOR_CORAL = u'crl'
|
||||
COLOR_KHAKI = u'kki'
|
||||
COLOR_LIGHTGREY = u'lig'
|
||||
COLOR_ORANGE = u'org'
|
||||
|
||||
COLOR_CHOICES = (
|
||||
(COLOR_BLUE, _(u'Blue')),
|
||||
(COLOR_CYAN, _(u'Cyan')),
|
||||
(COLOR_CORAL, _(u'Coral')),
|
||||
(COLOR_GREENYELLOW, _(u'Green-Yellow')),
|
||||
(COLOR_KHAKI, _(u'Khaki')),
|
||||
(COLOR_LIGHTGREY, _(u'LightGrey')),
|
||||
(COLOR_MAGENTA, _(u'Magenta')),
|
||||
(COLOR_RED, _(u'Red')),
|
||||
(COLOR_ORANGE, _(u'Orange')),
|
||||
(COLOR_YELLOW, _(u'Yellow'))
|
||||
)
|
||||
|
||||
COLOR_CODES = (
|
||||
(COLOR_RED, u'red'),
|
||||
(COLOR_BLUE, u'blue'),
|
||||
(COLOR_MAGENTA, u'magenta'),
|
||||
(COLOR_CYAN, u'cyan'),
|
||||
(COLOR_YELLOW, u'yellow'),
|
||||
(COLOR_GREENYELLOW, u'greenyellow '),
|
||||
(COLOR_CORAL, u'coral'),
|
||||
(COLOR_KHAKI, u'khaki'),
|
||||
(COLOR_ORANGE, u'orange'),
|
||||
(COLOR_LIGHTGREY, u'lightgrey'),
|
||||
)
|
||||
@@ -1,21 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from . import tag_document_remove, tag_tagged_item_list
|
||||
|
||||
|
||||
def get_tags_subtemplate(obj):
|
||||
"""
|
||||
Return all the settings to render a subtemplate containing an
|
||||
object's tags
|
||||
"""
|
||||
return {
|
||||
'name': 'generic_list_subtemplate.html',
|
||||
'context': {
|
||||
'title': _(u'tags'),
|
||||
'object_list': obj.tags.all(),
|
||||
'hide_link': True,
|
||||
'navigation_object_links': [tag_tagged_item_list, tag_document_remove],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user