Did I find the right examples for you? yes no

All Samples(112)  |  Call(90)  |  Derive(0)  |  Import(22)
Aborts execution and causes a 303 redirect 

        def redirect(url, code=303):
    """ Aborts execution and causes a 303 redirect """
    scriptname = request.environ.get('SCRIPT_NAME', '').rstrip('/') + '/'
    location = urljoin(request.url, urljoin(scriptname, url))
    raise HTTPResponse("", status=code, header=dict(Location=location))
        


src/b/i/BigBlueButton-PythonExample-HEAD/main.py   BigBlueButton-PythonExample(Download)
#! coding: utf-8
# pylint: disable-msg=W0311
from bottle import route, redirect, request, run, jinja2_template, \
                    debug, static_file, response
import api
 
      if username not in info.get("moderator_users") and username not in settings.admins:
        redirect("/start")
 
      users = api.suggest("")
      attendee_users = [x.strip() for x in attendee_users if x != ""]
      api.update(username, meeting_id, name, attendee_users)
      redirect('/start')
 
 
      if username in info.get("moderator_users"):
        api.remove(meeting_id)
  redirect("/start")
 
 
  ok = api.check(username, password)
  if not ok:
    redirect("/login")
  meeting_list = api.meeting_list()
 

src/h/e/healthgraph-api-0.3.0/samples/bottle/runkeeper_demo.py   healthgraph-api(Download)
def index():
    sess = bottle.request.environ['beaker.session']
    if sess.has_key('rk_access_token'):
        bottle.redirect('/welcome')
    else:
        sess['rk_access_token'] = access_token
        sess.save()
        bottle.redirect('/welcome')
 
@bottle.route('/welcome')
                               records=records.get_totals())
    else:
        bottle.redirect('/')
 
@bottle.route('/logout')
def logout():
    sess = bottle.request.environ['beaker.session']
    sess.delete()
    bottle.redirect('/')
                                             else None))
    else:
        bottle.redirect('/')
 
 

src/c/o/cony-0.2.0/examples/search.py   cony(Download)
from bottle import redirect
 
 
def cmd_fl(term):
    """Search among Flickr photos under Creative Commons license."""
    redirect('http://www.flickr.com/search/?q=%s&l=cc&ss=0&ct=0&mt=all&w=all&adv=1' % term)
 
 
def cmd_pep(term):
    redirect('http://www.python.org/dev/peps/pep-%0.4d/' % int(term))
def cmd_dj(term):
    """Django documentation search."""
    redirect(
        'http://docs.djangoproject.com/en/dev/search/?cx=009763561546736975936:e88ek0eurf4&'
        'cof=FORID:11&q=%s&siteurl=docs.djangoproject.com/en/dev/topics/db/models/' % term

src/c/o/cony-0.2.0/examples/lang.py   cony(Download)
import urllib
 
from bottle import redirect
 
def cmd_tr(term):
    else:
        direction = 'en|ru'
    redirect('http://translate.google.com/#%s|%s' % (direction, term))
 
def cmd_save_word(term):

src/t/h/thermos-0.1.5/examples/thermos-example-bottle-repozewhat.py   thermos(Download)
 
from bottle import route, run, app, get, post, abort, request, debug
from bottle import template, redirect
 
from repoze.what.plugins.quickstart import setup_sql_auth

src/b/o/bottle-sqlalchemy-0.3.1/examples/basic.py   bottle-sqlalchemy(Download)
#!/usr/bin/python
import bottle
from bottle import route, redirect, put, delete
from bottle.ext.sqlalchemy import SQLAlchemyPlugin
 

src/b/o/Bottle-SSLify-0.0.1/bottle_sslify.py   Bottle-SSLify(Download)
 
 
from bottle import hook, redirect, request
 
class SSLify(object):
        code = 301 if self.permanent else 302
 
      redirect(url, code=code)
 

src/h/y/hy454-0.4.4/lib/hy454/_server.py   hy454(Download)
import bottle
 
from bottle import get, post, redirect, request, route, static_file
 
 
            return static_file('invalid.html', root=views)
    pool.apply_async(process_job, (seqfiles[0],), callback=fill_job_templates, error_callback=partial(report_job_error, jid=jid))
    redirect('/job/%s/' % jid)
 
@route('/job/<jid>/<part>')

src/c/i/circus-web-0.1/circusweb/circushttpd.py   circus-web(Download)
try:
    from beaker.middleware import SessionMiddleware
    from bottle import app, run, static_file, redirect, request
    from socketio import socketio_manage
except ImportError, e:
            set_message('Impossible to connect')
 
        redirect('/')
 
 
@route('/disconnect')
def disconnect():
    if disconnect_from_circus():
        set_message('You are now disconnected')
    redirect('/')

src/i/r/iron-HEAD/www.py   iron(Download)
        item.save(parent)
 
    bottle.redirect('/')
 
 
    item.set_archived()
 
    bottle.redirect('/')
 
 

  1 | 2 | 3 | 4  Next