标签:for als groups name sem taf import ESS django
from django.forms.models import model_to_dict from user.model import userprofile model_to_dict(userprofile.model.get(id=100)) d3 = {‘username‘: ‘zz_yy‘, ‘password‘: ‘zyjzyj‘} a = UserProfile() a.username = ‘zz__e‘ a.password = ‘33ff‘ d3 = model_to_dict(a) print(d3) #{‘id‘: None, ‘password‘: ‘33ff‘, ‘last_login‘: None, ‘is_superuser‘: #False, ‘username‘: ‘zz__e‘, ‘first_name‘: ‘‘, ‘last_name‘: ‘‘, #‘email‘: ‘‘, ‘is_staff‘: False, ‘is_active‘: True, ‘date_joined‘: #datetime.datetime(2018, 10, 19, 20, 27, 0, 22740), #‘account_person‘: None, ‘if_show_gift_account‘: False, #‘advertisement_type‘: None, ‘account_type‘: ‘advertiser‘, #‘nick_name‘: None, ‘gender‘: ‘male‘, ‘address‘: None, ‘mobile‘: #None, ‘groups‘: <QuerySet []>, ‘user_permissions‘: <QuerySet #[]>}
标签:for als groups name sem taf import ESS django
原文地址:https://www.cnblogs.com/zhaoyingjie/p/9818614.html