Did I find the right examples for you? yes no

All Samples(7)  |  Call(0)  |  Derive(0)  |  Import(7)

        def login_required(f):
    @wraps(f)
    def decorated_function(*args, **kwargs):
        if g.user is None:
            return redirect(url_for('admin.login', next=request.url))
        return f(*args, **kwargs)
    return decorated_function
        


src/i/n/indextank-service-HEAD/storefront/views.py   indextank-service(Download)
from django.contrib.auth.models import User
from django.contrib import auth
 
from util import render, login_required, get_index_code, get_index_id_for_code
from models import PFUser, Account, Package, Index, ScoreFunction, BetaTestRequest, BetaInvitation, AccountPayingInformation, PaymentSubscription, ContactInfo, BlogPostInfo

src/i/n/indextank-service-HEAD/backoffice/views.py   indextank-service(Download)
    WorkerLoadInfo, Index, BetaTestRequest, BetaInvitation, generate_onetimepass, \
    Package, Account, Deploy, IndexConfiguration
from util import Context, login_required, staff_required
import datetime
import forms

src/g/a/gaeicious-HEAD/app/twitter.py   gaeicious(Download)
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
from main import BaseHandler
from util import api, login_required, get_api
from webapp2 import WSGIApplication, Route, RequestHandler

src/m/a/malt.io-HEAD/handlers/profile.py   malt.io(Download)
from handlers.base import BaseHandler
from models.userprefs import UserPrefs
from util import render, login_required
 
 

src/c/o/Cockerel-HEAD/cockerel/auth/__init__.py   Cockerel(Download)
from util import login_required, permissions
 

src/m/a/malt.io-HEAD/handlers/messages.py   malt.io(Download)
from models.message import Message
from models.userprefs import UserPrefs
from util import login_required
 
 

src/m/a/malt.io-HEAD/handlers/index.py   malt.io(Download)
from models.useraction import UserAction
from models.userprefs import UserPrefs
from util import login_required