OpenSlides/openslides/users/migrations/0001_initial.py

50 lines
2.6 KiB
Python
Raw Normal View History

2015-06-29 13:23:19 +02:00
from django.db import migrations, models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
2016-01-09 18:49:38 +01:00
('auth', '0006_require_contenttypes_0002'),
2015-06-29 13:23:19 +02:00
]
operations = [
migrations.CreateModel(
name='User',
fields=[
2016-01-09 18:49:38 +01:00
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('password', models.CharField(verbose_name='password', max_length=128)),
('last_login', models.DateTimeField(verbose_name='last login', null=True, blank=True)),
2015-06-29 13:23:19 +02:00
('is_superuser', models.BooleanField(
2016-01-09 18:49:38 +01:00
help_text='Designates that this user has all permissions without explicitly assigning them.',
verbose_name='superuser status', default=False)),
('username', models.CharField(max_length=255, blank=True, unique=True)),
('first_name', models.CharField(max_length=255, blank=True)),
('last_name', models.CharField(max_length=255, blank=True)),
('structure_level', models.CharField(blank=True, max_length=255, default='')),
('title', models.CharField(blank=True, max_length=50, default='')),
('about_me', models.TextField(blank=True, default='')),
('comment', models.TextField(blank=True, default='')),
('default_password', models.CharField(blank=True, max_length=100, default='')),
('is_active', models.BooleanField(default=True)),
('is_present', models.BooleanField(default=False)),
2015-06-29 13:23:19 +02:00
('groups', models.ManyToManyField(
related_name='user_set',
2016-01-09 18:49:38 +01:00
help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
verbose_name='groups', blank=True, to='auth.Group', related_query_name='user')),
2015-06-29 13:23:19 +02:00
('user_permissions', models.ManyToManyField(
2016-01-09 18:49:38 +01:00
related_name='user_set', help_text='Specific permissions for this user.', verbose_name='user permissions',
blank=True, to='auth.Permission', related_query_name='user')),
2015-06-29 13:23:19 +02:00
],
options={
'permissions': (
2016-01-09 18:49:38 +01:00
('can_see_name', 'Can see names of users'), ('can_see_extra_data', 'Can see extra data of users'),
2015-06-29 13:23:19 +02:00
('can_manage', 'Can manage users')),
2016-01-09 18:49:38 +01:00
'ordering': ('last_name', 'first_name', 'username'),
'default_permissions': (),
2015-06-29 13:23:19 +02:00
},
bases=(openslides.utils.models.RESTModelMixin, models.Model),
),
]