Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/z/a/zamboni-HEAD/mkt/files/views.py   zamboni(Download)
 
import commonware.log
from cache_nuggets.lib import Message, Token
from tower import ugettext as _
 
def redirect(request, viewer, key):
    new = Token(data=[viewer.file.id, key])
    new.save()
    url = urljoin(settings.STATIC_URL,
                  reverse('mkt.files.serve', args=[viewer, key]))

src/z/a/zamboni-HEAD/mkt/reviewers/views.py   zamboni(Download)
from amo.utils import (escape_all, HttpResponseSendFile, JSONEncoder, paginate,
                       redirect_for_login, smart_decode)
from cache_nuggets.lib import Token
from devhub.models import ActivityLog, ActivityLogAttachment
from editors.forms import MOTDForm
    if token:
        # Generate a fresh token.
        token = Token(data={'app_id': addon.id})
        token.save()
        package_path = urlparams(package_path, token=token.token)
    def post(self, request, pk, *args, **kwargs):
        app = self.get_object()
        token = Token(data={'app_id': app.id})
        token.save()
 

src/z/a/zamboni-HEAD/apps/files/decorators.py   zamboni(Download)
from datetime import datetime
import functools
 
import commonware.log
from cache_nuggets.lib import Token

src/z/a/zamboni-HEAD/mkt/reviewers/tests/test_views.py   zamboni(Download)
                       req_factory_factory, user_factory, version_factory)
from amo.utils import isotime
from cache_nuggets.lib import Token
from devhub.models import ActivityLog, ActivityLogAttachment, AppLog
from editors.models import (CannedResponse, EscalationQueue, RereviewQueue,
    def test_token_good(self):
        if not settings.XSENDFILE:
            raise SkipTest()
 
        token = Token(data={'app_id': self.app.id})
    def test_token_bad(self):
        token = Token(data={'app_id': 'abcdef'})
        token.save()
        self.setup_files()
        self.client.logout()
    def test_token_good(self):
        token = Token(data={'app_id': self.app.id})
        token.save()
        self.setup_files()
        self.client.logout()
    def test_token_bad(self):
        token = Token(data={'app_id': 'abcdef'})
        token.save()
        self.setup_files()
        self.client.logout()

src/z/a/zamboni-HEAD/mkt/reviewers/tests/test_views_api.py   zamboni(Download)
from django.core.urlresolvers import reverse
 
from cache_nuggets.lib import Token
from nose.tools import eq_
from test_utils import RequestFactory