##// END OF EJS Templates
Parse direct option of the quote tag in addition to the source option
Parse direct option of the quote tag in addition to the source option

File last commit:

r1254:6b9c7236 default
r1398:a28c6a15 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)