Create editable page for user User Account

82 Views Asked by At

So my question is what should I look for creating a page which will allow user to add some information after the registration. I took a look at Django Profiles, but it requires lower version of Python (2.7), if I'm not mistaken.

Another thing is I need to create two types of users - I'm thinking of maybe @permission to implement it, but another point is that I want to include something like checkbox while registration, and if user chooses one type of user, he will be allowed to see default account page for this type of user which he should fill up.

I'm running Django 1.10.5 and Python 3.6.0.

Thanks in advance.

1

There are 1 best solutions below

1
pythad On

If you want to add custom fields to your user object take a look at custom user model django implementation. Then, for updating user object you can just use generic update view, it will look something like this:

from django.contrib.auth import get_user_model

class UserUpdateView(UpdateView):
    model = get_user_model()
    fields = ['field1', 'field2', 'field3']
    template_name = "core/user_edit.html"