Added gender field for users.

This commit is contained in:
Norman Jäckel 2019-01-18 17:58:45 +01:00
parent 57202e74ca
commit 168561bc55
5 changed files with 22 additions and 1 deletions

View File

@ -36,6 +36,7 @@ Motions:
User: User:
- Added new admin group which grants all permissions. Users of existing group - Added new admin group which grants all permissions. Users of existing group
'Admin' or 'Staff' are move to the new group during migration [#3859]. 'Admin' or 'Staff' are move to the new group during migration [#3859].
- Added gender field [#4124].
Version 2.3 (2018-09-20) Version 2.3 (2018-09-20)

View File

@ -33,7 +33,8 @@ class UserAccessPermissions(BaseAccessPermissions):
# * full data i. e. all fields (including session_auth_hash), # * full data i. e. all fields (including session_auth_hash),
# * all data i. e. all fields but not session_auth_hash, # * all data i. e. all fields but not session_auth_hash,
# * many data i. e. all fields but not the default password and session_auth_hash, # * many data i. e. all fields but not the default password and session_auth_hash,
# * little data i. e. all fields but not the default password, session_auth_hash, comments and active status, # * little data i. e. all fields but not the default password, session_auth_hash,
# comments, gender, email, last_email_send and active status,
# * no data. # * no data.
# Prepare field set for users with "all" data, "many" data and with "little" data. # Prepare field set for users with "all" data, "many" data and with "little" data.

View File

@ -0,0 +1,16 @@
# Generated by Django 2.1.5 on 2019-01-18 16:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("users", "0007_superadmin")]
operations = [
migrations.AddField(
model_name="user",
name="gender",
field=models.CharField(blank=True, max_length=255),
)
]

View File

@ -134,6 +134,8 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser):
last_name = models.CharField(max_length=255, blank=True) last_name = models.CharField(max_length=255, blank=True)
gender = models.CharField(max_length=255, blank=True)
email = models.EmailField(blank=True) email = models.EmailField(blank=True)
last_email_send = models.DateTimeField(blank=True, null=True) last_email_send = models.DateTimeField(blank=True, null=True)

View File

@ -29,6 +29,7 @@ USERCANSEESERIALIZER_FIELDS = (
USERCANSEEEXTRASERIALIZER_FIELDS = USERCANSEESERIALIZER_FIELDS + ( USERCANSEEEXTRASERIALIZER_FIELDS = USERCANSEESERIALIZER_FIELDS + (
"gender",
"email", "email",
"last_email_send", "last_email_send",
"comment", "comment",