You may go with Russ' solution or you may create two UserGroups, one for
Students and one for Teachers, each having different access rights. This
also allows for the edge case where a person may be a teacher and a student
on the same time.
Different behavior at python level can be implemented b
Short version: You don’t.
Your site may have 2 types of user - but that doesn’t mean you have 2 user
models. The user model is primarily for determining authentication;
authorisation can be handled separately.
So - set up a user model the way you normally would; then define a Teacher
model an
... here's a solution I found really useful. It uses a base profile
with inheritance.
http://stackoverflow.com/questions/1796556/django-multi-table-inheritance-vs-specifying-explicit-onetoone-relationship-in-mo
ALJ
--
You received this message because you are subscribed to the Google Groups
"D
On 18/02/10 08:31, Sander wrote:
Can you explain yourself a little bit more about the other one to one
fields?
Well, django has a "OneToOneField" field type, that is like ForeignKey"
only assumes the two models are, well, one to one. And thus, the
generated reverse relation accessor returns
Can you explain yourself a little bit more about the other one to one
fields?
Interrested in your ideas.
On 17 feb, 14:13, David De La Harpe Golden
wrote:
> On 17/02/10 08:53, bruno desthuilliers wrote:
>
> > user.get_profile().student.student_number or
> > user.get_profile().teacher.gender - bu
On 17/02/10 08:53, bruno desthuilliers wrote:
user.get_profile().student.student_number or
user.get_profile().teacher.gender - but it works.
I'm becoming pretty vague on what advantage the userprofile mechanism
offers over other one to one fields to User. Is it just a convention at
this stag
Sounds pretty straight forward. gonna try it out.
Thanks!
On 17 feb, 09:53, bruno desthuilliers
wrote:
> On Feb 16, 3:13 pm, Sander wrote:
>
>
>
> > Hello everybody,
>
> > I'm kinda new to Django, and just finished reading the Django book.
> > Now I was wondering the following when it comes t
On Feb 16, 3:13 pm, Sander wrote:
> Hello everybody,
>
> I'm kinda new to Django, and just finished reading the Django book.
> Now I was wondering the following when it comes to user management.
>
> In the Django documentation I found that storing additional
> information is acomplished by writing
8 matches
Mail list logo