I am extending the User Model, but seem to be having a problem with using my new admin form. I have the following code in models.py:
My models: class UserProfile(models.Model): TYPES_CHOICES = ( (0, _(u\'teacher\')), (1, _(u\'student\')),
Note: If you are tempted to \'answer\' this question by telling me that you don\'t like django.contrib开发者_如何学运维.auth, please move on.That will not be helpful.I am well aware of the range and s
I have decided to move a project from PHP to Python and despite hours of searching, I cannot find a way to implement the following design. I have attempted extending the user class and doing customise
profile = UserProfile.objects.get(....) what i try to do - is to 开发者_如何转开发get profile for the currently logged in user. What should i put in the brackets?Assuming you are following the patte
I need to have a function tell me if a Django session-id is currently authenticated or not. I understand this is already built into Django and I have that working just fine.
I am just using the admin site in Django. I have 2 Django signals (pre_save and post_save). I would like to have the username of the current user. How would I do that? It does not seem I can send a re
I have extended the user model using the UserProfile method. However I occasionally get the Django error message UserProfile matching query does not exist when running the query request.user.get_profi
If I go to the Django ad开发者_JAVA技巧min page and delete a user, I want it to run some code before/after it deletes the user. I know about overriding models\' delete() methods, but I\'m not sure how
If you want to store extra information about a user (django.contrib.auth.models.User) in Django you can use the nifty AUTH_PROFILE_MODULE to plug in a \"profile\" model. Each user then gets a profile.