##// END OF EJS Templates
If thread is specified in the post template, do not load it again
If thread is specified in the post template, do not load it again

File last commit:

r1254:6b9c7236 default
r1670:c9facaf1 default
Show More
all_tags.py
23 lines | 610 B | text/x-python | PythonLexer
from django.shortcuts import render
from boards.views.base import BaseBoardView
from boards.models.tag import Tag
PARAM_SECTION_TAGS = 'section_tags'
PARAM_TAGS = 'all_tags'
PARAM_QUERY = 'query'
class AllTagsView(BaseBoardView):
def get(self, request, query=None):
params = dict()
params[PARAM_SECTION_TAGS] = Tag.objects.filter(required=True)
if query != 'required':
params[PARAM_TAGS] = Tag.objects.get_not_empty_tags().filter(
required=False)
params[PARAM_QUERY] = query
return render(request, 'boards/tags.html', params)