Hello,

I am writing website and i`d like to implement profile managment. Basic thing 
would be to edit some of user details by themself, like first and last name 
etc. Now, i had to extend User model to add my own stuff, and email address.
I am having troubles with displaying form. Example will describe better what i 
would like achieve.

This is mine extended user model.
class UserExtended(models.Model):
    user = models.ForeignKey(User, unique=True)

    kod_pocztowy = models.CharField(max_length=6,blank=True)
    email  = models.EmailField()

This is how my form looks like.
class ProfilUzytkownika(ModelForm):
    class Meta:
        model = User

That code displays lots of fields, most of them are not for users to edit, i 
could exclude them, but i would still miss ones from mine UserExtended class.

Is there a way to inherit User model in UserExtended modelform and then 
exclude fields? I tried but obviously failed.
Or i a down to creating my own form and updating particular fields?

I am back to reading docs but will wait for any responses.

Thanks for help.


-- 
Michał Klich

klich.mic...@gmail.com
mic...@michalklich.com
http://www.michalklich.com

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to