##// END OF EJS Templates
Disable websocket by default. Use JS thread update when websockets are...
Disable websocket by default. Use JS thread update when websockets are disabled instead of throwing an error

File last commit:

r1069:389105b1 default
r1147:24687cf5 default
Show More
all_tags.py
22 lines | 540 B | text/x-python | PythonLexer
from django.shortcuts import render
from boards.views.base import BaseBoardView
from boards.models.tag import Tag
PARAM_TAGS = 'all_tags'
PARAM_QUERY = 'query'
class AllTagsView(BaseBoardView):
def get(self, request, query=None):
params = dict()
if query == 'required':
params[PARAM_TAGS] = Tag.objects.filter(required=True)
else:
params[PARAM_TAGS] = Tag.objects.get_not_empty_tags()
params[PARAM_QUERY] = query
return render(request, 'boards/tags.html', params)