django-users
Using new Admin Form when Customizing Django User Model
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:[详细]
2023-03-22 22:55 分类:问答Django - UserProfile m2m field in admin - error
My models: class UserProfile(models.Model): TYPES_CHOICES = ( (0, _(u\'teacher\')), (1, _(u\'student\')),[详细]
2023-03-07 23:47 分类:问答Django: Why create a OneToOne to UserProfile instead of subclassing auth.User?
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[详细]
2023-02-20 16:19 分类:问答Implementing multiple administration levels in Django
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[详细]
2023-02-17 10:55 分类:问答Django 1-1 relationship how to
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[详细]
2023-02-12 22:02 分类:问答Manually validate a django session id is currently authenticated
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.[详细]
2023-02-11 22:33 分类:问答Get current user log in signal in Django
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[详细]
2023-02-05 10:07 分类:问答Django - redirect to login page if UserProfile matching query does not exist error
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[详细]
2023-01-14 18:14 分类:问答Modify Django user delete method?
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[详细]
2023-01-11 21:21 分类:问答How do I inline edit a django user profile in the admin interface?
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.[详细]
2023-01-10 06:23 分类:问答