Log in

Custom user profile

grwhumphriesGrant Humphries
  • 5 Jul

I haven't been able to find much information, but wondering about how you go about a custom user profile with Spirit? i.e. I want to add more fields to the user registration.

Also, when a user signs up using the registration form from Spirit, does that link to the standard django auth.User table?

Thanks

nitelyEsteban Castro Borsani

I want to add more fields to the user registration.

You are in luck. Spirit is usually not very extensible, but it seems that's possible. You can override that URL and pass a custom register form, the commit even has an example. You can probably extend the Spirit form and add more fields to it or just create your own form however you like.

As long as your custom user model (or profile) does not remove stuff from django User model it should be fine. In fact, try to avoid all the django User overriding and use a oneToOneField to it, if you need to add custom fields to that model.

Also, when a user signs up using the registration form from Spirit, does that link to the standard django auth.User table?

Yes, Spirit just uses django User model. There is a Spirit profile (it has a oneToOneField to User), but that's not used by the auth app. The auth app uses all django standard stuff.

I haven't been able to find much information, but wondering about how you go about a custom user profile with Spirit?

I don't think that's possible right now, but you may create a PR doing something similar to the registering view. Otherwise, just fork Spirit.

grwhumphriesGrant Humphries
  • 8 Jul

Thanks. That gives me some ideas on how to make progress there!

Reply