2008/4/29 francesco <[EMAIL PROTECTED]>:
>  I'd like to implement two kind of users in my system: a buyer and a
>  seller.
>  Both kind of users should, of course, inherit from a user model.
>  As I'd like to use the authentication framework from django.contrib,
>  should I have the "user" as table in the database or can I get by with
>  an abstract inheritance where no table is created for the user?

Hello !

In my experience, inheritance is overkill in this case. Composition is
very often a better alternative. In most cases, if you can express
your model both with inheritance and with composition, you should use
composition.

Let's be a bit more clear :

In your case, you can model with composition : a user has a function
(seller or buyer). It gives you a bit more functionnality (a user can
be both a seller and a buyer) and a bit more flexibility (a buyer can
become a seller, or the opposite).

Inheritance is a very strong relationship. It cant be changed
dynamically. It should be used carefully ...

Good luck !

   MrG



-- 
Jabber : [EMAIL PROTECTED]
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.ledcom.ch/

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