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

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

src/m/o/moztrap-HEAD/moztrap/view/users/views.py   moztrap(Download)
def create_apikey(request, user_id):
    """Generate an API key for the given user; redirect to their edit page."""
    user = get_object_or_404(model.User, pk=user_id)
    model.ApiKey.generate(owner=user, user=request.user)