B
B
bogdan_242016-05-24 14:50:03
Django
bogdan_24, 2016-05-24 14:50:03

Django, user registration. How to implement?

model was created with user

class User(model_user.User):
    position_lat = models.DecimalField(decimal_places=8, max_digits=10, verbose_name="Широта")
    position_long = models.DecimalField(decimal_places=8, max_digits=10, verbose_name="Довгота")
    date_registration = models.DateTimeField(auto_now_add=True, verbose_name="Дата реєстрації")

    class Meta:
        verbose_name = 'Користувач'
        verbose_name_plural = 'Користувачі'

    def __str__(self):
        return self.username

    def get_name(self):
        return '{0} {1}'.format(self.first_name, self.last_name)

After creating a new user in the application where the model is implemented, it is displayed in the Users and Groups application. But if you go to the user settings, in the password field it says "Unknown password format or hashing algorithm. Passwords are stored in a secure form, so we have no way to find out this user's password. However, you can change his / her password using this form." After changing the password through the form, authorization starts working

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-05-24
@sim3x

stackoverflow.com/questions/21779226/abstractuser-...
https://docs.djangoproject.com/en/1.9/topics/auth/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question