Implementing Profile Provider in ASP.NET MVC

Here’s what you need to do: 1) In Web.config’s section, add “inherits” attribute in addition to your other attribute settings: <profile inherits=”MySite.Models.ProfileCommon” defaultProvider=”…. 2) Remove entire <properties> section from Web.config, since you have already defined them in your custom ProfileCommon class and also instructed to inherit from your custom class in previous step 3) Change … Read more

How to customize user profile when using django-allauth

Suppose you want to ask the user for his first/last name during signup. You’ll need to put these fields in your own form, like so: class SignupForm(forms.Form): first_name = forms.CharField(max_length=30, label=”Voornaam”) last_name = forms.CharField(max_length=30, label=”Achternaam”) def signup(self, request, user): user.first_name = self.cleaned_data[‘first_name’] user.last_name = self.cleaned_data[‘last_name’] user.save() Then, in your settings point to this form: ACCOUNT_SIGNUP_FORM_CLASS … Read more