On Thu, Apr 14, 2011 at 4:20 PM, gladys <gladysbi...@gmail.com> wrote:

> Define a model with one-to-one correspondence with User.
> Example:
>    class UserProfile:
>        user = models.OneToOneField(User)
>        ...
>
> By the way, how different are the forms? Because if they are the same
> for a group of users (say you will implement a user type), you can
> take advantage of Group that is already associated with the User
> model.
>
>
> I will look into your advice.  I also found some stuff on the django
project site about subclassing that might work.

The form is identical.  Its a form that a Hotelier fills out to describe
their property.  I work for a Travel company.  What I need is for each user
to only access the data for their hotel.  So I was planning to take some key
in the user model and have that as a foreign key in the hotel model so that
I know whose data to populate the form with.


> --
> Gladys
> http://blog.bixly.com
>
>
> On Apr 15, 1:49 am, Joel Goldstick <joel.goldst...@gmail.com> wrote:
> > I'm new to Django.  I've done the djangoproject tutorial and some others,
> > but I haven't come across an answer to my current problem.  I have a form
> > that the users fill out.  I want the user to be restricted to his form
> > only.  Admin should be able to see all forms info.  I was thinking I
> could
> > add a field to the user model, then select the correct form to show for
> > editing based on that field when the user logs in.  Am I thinking
> > correctly?  If so, how do I add to the user model?
> >
> > --
> > Joel Goldstick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@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.
>
>


-- 
Joel Goldstick

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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