Re: Multiple Profiles in Django 1.11

2017-04-18 Thread Camilo Torres
Hi, I think you can use the default authentication system and create 2 different groups: 'students' and 'teachers', give 'students' group permissions to all the parts of the application for students; similarly, give the 'teachers' group permissions to all the parts of the teachers application;

Multiple Profiles in Django 1.11

2017-04-18 Thread Bujj
Hi guys i am new to django and i need some help here, i have created two apps inside my django project namely students and teachers, how do i create an authentication system for each one of them? where they can register and login to their backend, which will have a totaly different look from on

Re: Multiple Profiles

2007-05-27 Thread Vinay Sajip
On May 14, 10:15 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > In my opinion there's only one easy solution which doesn't create > ridiculous overhead and that is to be able to add fields to the User > model without having to hack the actual code of the User model. Does > anyone agree

Re: Multiple Profiles

2007-05-14 Thread Bram - Smartelectronix
Amit Upadhyay wrote: > On 5/9/07, *Vinay Sajip* <[EMAIL PROTECTED] > > wrote: > > One simple problem with Amit's approach, as written, is that you have > to deal with "fuser" and "duser", which feels a little kludgy (I > realise he was just demonstrating the

Re: Multiple Profiles

2007-05-11 Thread Amit Upadhyay
On 5/9/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > One simple problem with Amit's approach, as written, is that you have > to deal with "fuser" and "duser", which feels a little kludgy (I > realise he was just demonstrating the concept, but the problem still > remains that you want to think of a

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 9, 7:21 pm, Vinay Sajip <[EMAIL PROTECTED]> wrote: > It appears not. Just to see if it would work, I tried just adding > overriding __getattribute__ (which just calls the superclass > behaviour) and it causes some unexpected behaviour in the unit tests. False alarm - it was a typo on my

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 9, 6:37 pm, Vinay Sajip <[EMAIL PROTECTED]> wrote: > part of the user model. Is the intention just to avoid saying > user.get_profile().xxx? Can't this be done by judiciously overriding > __getattribute__ in User, to delegate to a profile if one is defined? It appears not. Just to see if

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 8, 2:57 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 5/8/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I'm having this issue currently as well-- an app I'm working on is > heavily based on profiles and relations to it, so most code is > constantly doing user.get_profile.something

Re: Multiple Profiles

2007-05-09 Thread Amit Upadhyay
On 5/8/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 5/8/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I would recommend you take a look at lost-theories.com source code. One > anti > > pattern that django docs seems to recommend is use > > django.contrib.auth.models.User as your main user

Re: Multiple Profiles

2007-05-08 Thread Jeremy Dunck
On 5/8/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > I would recommend you take a look at lost-theories.com source code. One anti > pattern that django docs seems to recommend is use > django.contrib.auth.models.User as your main user model ... > and user.get_profile().friends.all() sounds wrong.

Extending django User model to multiple profiles

2007-04-18 Thread checco
Hi, from here, as you certainly know, you can see how to extend the User model to fit the particular needs of a given application: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model In my application I have two different kind of users, so I have to extend it twice: which va

Re: Multiple profiles

2007-02-06 Thread voltron
by > > adding a profile class, this class is then set in the settings module > > thus: > > > AUTH_PROFILE_MODULE = "myapp.mysiteprofile" > > > How do I set multiple profiles? I would like to have different types > > of users, diffrentiating via different p

Re: Multiple profiles

2007-02-06 Thread mrstone
CTED]> wrote: > Hi, > > Accoridng to the Django book, one could extend the basic user model by > adding a profile class, this class is then set in the settings module > thus: > > AUTH_PROFILE_MODULE = "myapp.mysiteprofile" > > How do I set multiple prof

Multiple profiles

2007-02-05 Thread voltron
Hi, Accoridng to the Django book, one could extend the basic user model by adding a profile class, this class is then set in the settings module thus: AUTH_PROFILE_MODULE = "myapp.mysiteprofile" How do I set multiple profiles? I would like to have different types of users, diffrent