Skip to content

Instantly share code, notes, and snippets.

@plasticine
Created September 8, 2009 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plasticine/182691 to your computer and use it in GitHub Desktop.
Save plasticine/182691 to your computer and use it in GitHub Desktop.
from django.conf import settings
from django.contrib.auth.decorators import user_passes_test
@user_passes_test(lambda u: u.has_perm('foo.bar'), login_url=settings.LOGIN_URL)
def widgetize(request):
""" Clever, clever, clever... """
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment