Created
March 21, 2017 07:08
-
-
Save AlwxSin/39bc048d3da1c26030d91fce20df81d3 to your computer and use it in GitHub Desktop.
django type hinting classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthMiddlewareAwareHttpRequest(django.http.HttpRequest): | |
if 'django.contrib.auth' in django.conf.settings.MIDDLEWARE: | |
user: django.contrib.auth.models.AbstractUser | |
def myview(request: AuthMiddlewareAwareHttpRequest): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment