def _get_wiki_link(title, locale):
 from kitsune.wiki.models import Document
 d = get_object_fallback(Document, locale=locale, title=title, is_template=False)
 if d:
  while d.redirect_document():
   d = d.redirect_document()
  url = reverse('wiki.document', locale=locale, args=[d.slug])
  return {'found': True, 'url': url, 'text': d.title}
 from kitsune.sumo.templatetags.jinja_helpers import urlparams
 return {'found': False, 'text': title, 'url': urlparams(reverse('wiki.new_document', locale=locale), title=title)}

def _get_wiki_link ( title , locale ) : from kitsune . wiki . models import Document d = get_object_fallback ( Document , locale = locale , title = title , is_template = False ) if d : while d . redirect_document ( ) : d = d . redirect_document ( ) url = reverse ( 'wiki.document' , locale = locale , args = [ d . slug ] ) return { 'found' : True , 'url' : url , 'text' : d . title } from kitsune . sumo . templatetags . jinja_helpers import urlparams return { 'found' : False , 'text' : title , 'url' : urlparams ( reverse ( 'wiki.new_document' , locale = locale ) , title = title ) }
checks the page exists .