diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index 3040954..737d6d3 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -509,3 +509,6 @@ class AnonymousUser(object):
 
     def is_authenticated(self):
         return False
+
+    def get_username(self):
+        return self.username
