I managed to display form but with fields i`d like to not show or at
least disable modifications, like username and email.
Still would like some help on this .

On Apr 2, 4:36 pm, Michał Klich <mic...@michalklich.com> wrote:
> Thanks anyway :)
>
> I could create my own view and update respective database records but this
> would be my last resort.
> I know this can be achieved as i am displaying my ExtendedUser form during
> registration. I feel stupid, i am displaying it so i could have omit some
> fields and use it. I`ll dig around a little more.
>
> Dnia piątek 02 kwietnia 2010 o 14:52:05 Carl Zmola napisał(a):
>
>
>
>
>
> > This is  about the limits of my knowledge.
> > My goal was to use it in the admin and I succeeded.
>
> > If you write your own view, you can do anything you want, you just have
> > to figure out how :-)
>
> > On 04/02/2010 08:26 AM, Michał Klich wrote:
> > > Ok, thanks.
> > > Can this be done in regular view but not Admin?
> > > Would it be necessery to use formset along with inline?
> > > I`d appreciate if you shed some light on this.
>
> > > Thank you
>
> > > Dnia czwartek 01 kwietnia 2010 o 22:29:40 Carl Zmola napisał(a):
> > >> The standard way to extend user is through the user profile.
> > >> The following thread talked about showing user profile fields in the
> > >> Auth User admin form.
>
> > >>http://groups.google.com/group/django-users/browse_thread/thread/2af584b
> > >> 66b 8a38a3
>
> > >> This should be doable with the model manager, but you will have to play
> > >> around with it some.
> > >> Or you should just create your own form.
>
> > >> Carl
>
> > >> On 04/01/2010 08:30 AM, Michał Klich wrote:
> > >>> 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.comhttp://www.michalklich.com
>
>  signature.asc
> < 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to