Coder Social home page Coder Social logo

django-custom-user-example's People

Contributors

aniketmaithani avatar jonathanchu avatar othreecodes avatar simonluijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-custom-user-example's Issues

Subclassing AbstractEmailUser does not prompt for superuser on syncdb to blank database

I am virtually copying EmailUser, but just adding a field:

class CustomUser(AbstractEmailUser):
    """
    Subclass EmailUser to add the last_seen date.
    """
    last_seen = models.DateField(auto_now_add=True)

    class Meta(AbstractEmailUser.Meta):
        swappable = 'AUTH_USER_MODEL'

If I syncdb to a blank DB with AUTH_USER_MODEL = 'custom_user.EmailUser' then I am prompted for superuser no problem. But with my custom model above, no such luck. Thanks for any advice.

EDIT: I know I can call createsuperuser but I'd like to understand what I'm missing :)

cannot create superuser

When I run python manage.py createsuperuser, I got the following error:

ERRORS:
myapp.CustomUser.is_superuser: (models.E006) The field 'is_superuser' clash
es with the field 'is_superuser' from model 'myapp.customuser'.

Getting an ImportError

I'm getting:
ImportError: cannot import name MAXIMUM_PASSWORD_LENGTH

from django.contrib.auth.hashers import MAXIMUM_PASSWORD_LENGTH
in your forms.py

Indeed, that variable does not seem to be defined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.