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

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

src/d/j/django-otp-0.2.7/django_otp/plugins/otp_static/management/commands/addstatictoken.py   django-otp(Download)
        token = options.get('token')
        if token is None:
            token = StaticToken.random_token()
 
        device.token_set.add(StaticToken(token=token))

src/d/j/django-two-factor-auth-0.5.0/two_factor/views/core.py   django-two-factor-auth(Download)
        device.token_set.all().delete()
        for n in range(self.number_of_tokens):
            device.token_set.create(token=StaticToken.random_token())
 
        return redirect(self.redirect_url)

src/d/j/django-two-factor-auth-HEAD/two_factor/views/core.py   django-two-factor-auth(Download)
        device.token_set.all().delete()
        for n in range(self.number_of_tokens):
            device.token_set.create(token=StaticToken.random_token())
 
        return redirect(self.redirect_url)