On 17 oct, 05:30, jeffself <[EMAIL PROTECTED]> wrote:
> I'm working on an application that will need data entry from many
> users.  The users belong to various departments in the organization
> and the information that gets entered by each user should contain the
> department information.  The reason for this is that the users should
> be able to view and edit only records in their department.  They
> should not be able to view any records from any other department.
>
> I'm not sure how to go about doing this.  I definitely want to use the
> User model in Django and I'm thinking that all I want to do is extend
> it with a department field which is a foreign key of the Department
> model that I have created.  On the other hand, I've looked at Profiles
> as well and even created a UserProfile class which contains the user
> and the department.  Which is the correct approach?

AFAICT, there's some work going on to allow to replace the default
User model with a custom one. But so far, the recommended solution is
indeed to use a UserProfile. Else, there's the hackish (IOW : *not*
recommended) solution - monkeypatching the User model
http://www.amitu.com/blog/2007/july/django-extending-user-model/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to