Changeset 257:f26eebe3ee52
- Timestamp:
- 09.06.2010 22:40:09 (20 months ago)
- Branch:
- default
- Location:
- djangobb
- Files:
-
- 2 edited
-
djangobb_forum/views.py (modified) (17 diffs)
-
settings.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
djangobb/djangobb_forum/views.py
r255 r257 16 16 from django.utils.encoding import smart_str 17 17 from django.views.decorators.http import require_POST 18 from django.db import transaction 18 19 19 20 from djangobb_forum.util import render_to, paged, build_form, paginate, set_language … … 58 59 cmpdef = lambda a, b: cmp(a['cat'].position, b['cat'].position) 59 60 cats = sorted(cats.values(), cmpdef) 60 61 print cats62 61 63 62 to_return = {'cats': cats, … … 77 76 78 77 78 @transaction.commit_on_success 79 79 @render_to('forum/moderate.html') 80 80 @paged('topics', forum_settings.FORUM_PAGE_SIZE) … … 282 282 283 283 284 @transaction.commit_on_success 284 285 @render_to('forum/topic.html') 285 286 @paged('posts', forum_settings.TOPIC_PAGE_SIZE) … … 349 350 350 351 @login_required 352 @transaction.commit_on_success 351 353 @render_to('forum/add_post.html') 352 354 def add_post(request, forum_id, topic_id): … … 388 390 389 391 392 @transaction.commit_on_success 390 393 @render_to('forum/user.html') 391 394 def user(request, username): … … 495 498 496 499 @login_required 500 @transaction.commit_on_success 497 501 @render_to('forum/reputation.html') 498 502 def reputation(request, username): … … 551 555 552 556 @login_required 557 @transaction.commit_on_success 553 558 @render_to('forum/edit_post.html') 554 559 def edit_post(request, post_id): … … 572 577 573 578 @login_required 579 @transaction.commit_on_success 574 580 @render_to('forum/delete_posts.html') 575 581 @paged('posts', forum_settings.TOPIC_PAGE_SIZE) … … 623 629 624 630 @login_required 631 @transaction.commit_on_success 625 632 @render_to('forum/move_topic.html') 626 633 def move_topic(request): … … 661 668 662 669 @login_required 670 @transaction.commit_on_success 663 671 def stick_unstick_topic(request, topic_id): 664 672 … … 671 679 672 680 @login_required 681 @transaction.commit_on_success 673 682 @render_to('forum/delete_post.html') 674 683 def delete_post(request, post_id): … … 699 708 700 709 @login_required 710 @transaction.commit_on_success 701 711 def open_close_topic(request, topic_id): 702 712 … … 720 730 721 731 @login_required 732 @transaction.commit_on_success 722 733 @render_to('forum/pm/create_pm.html') 723 734 def create_pm(request): … … 755 766 756 767 @login_required 768 @transaction.commit_on_success 757 769 @render_to('forum/pm/message.html') 758 770 def show_pm(request, pm_id): … … 776 788 777 789 @login_required 790 @transaction.commit_on_success 778 791 def delete_subscription(request, topic_id): 779 792 topic = get_object_or_404(Topic, pk=topic_id) … … 786 799 787 800 @login_required 801 @transaction.commit_on_success 788 802 def add_subscription(request, topic_id): 789 803 topic = get_object_or_404(Topic, pk=topic_id) -
djangobb/settings.py
r253 r257 96 96 'django_authopenid.middleware.OpenIDMiddleware', 97 97 'django.middleware.cache.FetchFromCacheMiddleware', 98 'django.middleware.transaction.TransactionMiddleware', 98 99 'djangobb_forum.middleware.LastLoginMiddleware', 99 100 'djangobb_forum.middleware.UsersOnline',
Note: See TracChangeset
for help on using the changeset viewer.
