larssos/django.js — pull request #1 by thepapermen (2013-05-24 19:35:19+00:00)
Title: Custom user model

Hi! Thanks for an awesome work! I'm currently using your branch!

I had some trouble with your version of `utils.py` because `is_staff` and `is_superuser` are not present in `AbstractBaseUser` which I'm subclassing in my use case.

I think it is a good idea to base presuppositions about user model on `django.contrib.auth.models.AbstractBaseUser`, which is a barebone abstract user, instead of supposing that the user model is based on `PermissionsMixin` or `AbstractUser`.

From [Django manual](https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser):

>The easiest way to construct a compliant custom User model is to inherit from AbstractBaseUser. AbstractBaseUser provides the core implementation of a User model, including hashed passwords and tokenized password resets.

Best wishes,
Ivan