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

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

src/z/a/zamboni-HEAD/mkt/reviewers/views.py   zamboni(Download)
        # 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/mkt/files/views.py   zamboni(Download)
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/tests/test_views.py   zamboni(Download)
 
        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()
    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()