~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/views.py

  • Committer: kaputtnik
  • Date: 2019-08-11 12:01:32 UTC
  • mto: (544.2.15 pybb_attachments)
  • mto: This revision was merged to the branch mainline in revision 549.
  • Revision ID: kaputtnik-20190811120132-vrkrgrqn77ijih38
added a check for wai files, they need special treatment; create a link to a wikiarticle

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from django.shortcuts import redirect
12
12
from django.db.models import Q
13
13
from django.http import Http404
 
14
from django.conf import settings
14
15
 
15
16
from pybb.util import render_to, build_form, quote_text, ajax, urlize
16
17
from pybb.models import Category, Forum, Topic, Post, Attachment,\
137
138
            'page_size': pybb_settings.TOPIC_PAGE_SIZE,
138
139
            'form_url': reverse('pybb_add_post', args=[topic.id]),
139
140
            'is_spam': is_spam,
 
141
            'wikipage': settings.UPLOAD_WIKI_PAGE,
140
142
            }
141
143
show_topic = render_to('pybb/topic.html')(show_topic_ctx)
142
144
 
233
235
            'topic': topic,
234
236
            'forum': forum,
235
237
            'form_url': form_url,
 
238
            'wikipage': settings.UPLOAD_WIKI_PAGE,
236
239
            }
237
240
add_post = render_to('pybb/add_post.html')(add_post_ctx)
238
241