126 | | class User(models.Model): |
| 126 | class UserClass(object): |
| 127 | id = None |
| 128 | username = '' |
| 129 | is_staff = False |
| 130 | is_active = True |
| 131 | is_superuser = False |
| 132 | |
| 133 | def __init__(self): |
| 134 | raise NotImplementedError, _(('UserClass is an abstract class. Use ' |
| 135 | 'either User or AnonymousUser instead.')) |
| 136 | |
| 137 | def __unicode__(self): |
| 138 | raise NotImplementedError |
| 139 | |
| 140 | def __str__(self): |
| 141 | raise NotImplementedError |
| 142 | |
| 143 | def __eq__(self, other): |
| 144 | raise NotImplementedError |
| 145 | |
| 146 | def __ne__(self, other): |
| 147 | raise NotImplementedError |
| 148 | |
| 149 | def __hash__(self): |
| 150 | raise NotImplementedError |
| 151 | |
| 152 | def save(self): |
| 153 | raise NotImplementedError |
| 154 | |
| 155 | def delete(self): |
| 156 | raise NotImplementedError |
| 157 | |
| 158 | def set_password(self, raw_password): |
| 159 | raise NotImplementedError |
| 160 | |
| 161 | def check_password(self, raw_password): |
| 162 | raise NotImplementedError |
| 163 | |
| 164 | def groups(self): |
| 165 | raise NotImplementedError |
| 166 | |
| 167 | def user_permissions(self): |
| 168 | raise NotImplementedError |
| 169 | |
| 170 | def has_perm(self, perm): |
| 171 | raise NotImplementedError |
| 172 | |
| 173 | def has_module_perms(self, module): |
| 174 | raise NotImplementedError |
| 175 | |
| 176 | def get_and_delete_messages(self): |
| 177 | raise NotImplementedError |
| 178 | |
| 179 | def is_anonymous(self): |
| 180 | raise NotImplementedError |
| 181 | |
| 182 | def is_authenticated(self): |
| 183 | raise NotImpelementedError |
| 184 | |
| 185 | class User(models.Model, UserClass): |