OK, thanks for the clarification.  But I'm still trying to extend the form 
for the user signup, and I'm still getting that error.  Is this the right 
way to extend the ProfileForm?

On Sunday, January 10, 2016 at 5:45:25 PM UTC-5, Stephen McDonald wrote:
>
> Your code snippet omits where you've imported ProfileForm from, so we'll 
> just assume it's from mezzanine.accounts.forms - in which case you're using 
> it incorrectly, as it's the sign-up form for the front-end website, not the 
> form for managing users in the admin.
>
>
> On Mon, Jan 11, 2016 at 2:44 AM, Joel Gwynn <joe...@gmail.com 
> <javascript:>> wrote:
>
>> I must be missing something obvious here.  I'm just trying to extend the 
>> profile form like so:
>>
>>
>> # models.py
>> class Profile(models.Model):
>>     user = models.OneToOneField(User, on_delete=models.CASCADE)
>>
>>     organizations = models.ManyToManyField(Organization, default=None, 
>> blank=True)
>>     groups = models.ManyToManyField(Group, default=None, blank=True)
>>
>>
>> # admin.py
>> class ProfileAdmin(admin.ModelAdmin):
>>     model = Profile
>>     form = WebProfileForm
>>     
>> admin.site.register(Profile, ProfileAdmin)
>>
>>
>> # forms.py
>>
>> class WebProfileForm(ProfileForm):
>>
>>     class Meta(ProfileForm.Meta):
>>         model = Profile
>>         exclude = []
>>
>>
>> but I'm getting this error:
>>
>> django.core.exceptions.FieldError: Unknown field(s) (username, 
>> first_name, last_name, email) specified for Profile
>>
>> TIA,
>> Joel
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to