##// END OF EJS Templates
Post deletion when the thread is deleted is already handled by django. No need to implement it manually
Post deletion when the thread is deleted is already handled by django. No need to implement it manually

File last commit:

r1069:389105b1 default
r1226:e8ff96e4 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)