##// END OF EJS Templates
Added missing all_tags module. Moved authors view to class-based
neko259 -
r551:37f54a4a 1.7-dev
parent child Browse files
Show More
@@ -0,0 +1,12 b''
1 from django.shortcuts import render
2
3 from boards.views.base import BaseBoardView
4 from boards.models.tag import Tag
5
6 class AllTagsView(BaseBoardView):
7
8 def get(self, request):
9 context = self.get_context_data(request=request)
10 context['all_tags'] = Tag.objects.get_not_empty_tags()
11
12 return render(request, 'boards/tags.html', context)
@@ -0,0 +1,12 b''
1 from django.shortcuts import render
2
3 from boards.authors import authors
4 from boards.views.base import BaseBoardView
5
6 class AuthorsView(BaseBoardView):
7
8 def get(self, request):
9 context = self.get_context_data(request=request)
10 context['authors'] = authors
11
12 return render(request, 'boards/authors.html', context)
@@ -3,6 +3,7 b' from boards import views'
3 from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
3 from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
4 from boards.views import api, tag_threads, all_threads, archived_threads, \
4 from boards.views import api, tag_threads, all_threads, archived_threads, \
5 login, settings, all_tags
5 login, settings, all_tags
6 from boards.views.authors import AuthorsView
6
7
7 js_info_dict = {
8 js_info_dict = {
8 'packages': ('boards',),
9 'packages': ('boards',),
@@ -47,7 +48,7 b" urlpatterns = patterns('',"
47 url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'),
48 url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'),
48 url(r'^captcha/', include('captcha.urls')),
49 url(r'^captcha/', include('captcha.urls')),
49 url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'),
50 url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'),
50 url(r'^authors/$', views.authors, name='authors'),
51 url(r'^authors/$', AuthorsView.as_view(), name='authors'),
51 url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'),
52 url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'),
52 url(r'^ban/(?P<post_id>\w+)/$', views.ban, name='ban'),
53 url(r'^ban/(?P<post_id>\w+)/$', views.ban, name='ban'),
53
54
@@ -41,13 +41,6 b' def jump_to_post(request, post_id):'
41 + '#' + str(post.id))
41 + '#' + str(post.id))
42
42
43
43
44 def authors(request):
45 """Show authors list"""
46
47 context = _init_default_context(request)
48 context['authors'] = boards.authors.authors
49
50 return render(request, 'boards/authors.html', context)
51
44
52
45
53 @transaction.atomic
46 @transaction.atomic
General Comments 0
You need to be logged in to leave comments. Login now