2👍
✅
Finally digging around django-userena
and django-guardian
sources I present my output of this little research, so if you want the users to be able to edit their profile you can use the following code
User post save signal which adds ‘change_profile’ permission to new user objects
@receiver(post_save, sender=User, dispatch_uid='user.created')
def user_created(sender, instance, created, raw, using, **kwargs):
""" Adds 'change_profile' permission to created user objects """
if created:
from guardian.shortcuts import assign
assign('change_profile', instance, instance.get_profile())
1👍
For existing users, Just issue this command and the page will be working:
python manage.py check_permissions
- [Django]-Custom user_logged_in signal BEFORE django updates last_login
- [Django]-Django won't connect to Redis Docker container
- [Django]-Is this a good way to demonstrate Nodejs (expressjs) advantage over Rails/Django/etc?
- [Django]-Django-tutorial. The counter is not change
- [Django]-No module named rest_authusers error
Source:stackexchange.com