django-orchestra/orchestra/contrib/systemusers/migrations/0001_initial.py

31 lines
2.0 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2015-04-08 14:41:09 +00:00
from __future__ import unicode_literals
from django.db import models, migrations
2015-04-29 13:55:22 +00:00
import orchestra.core.validators
2015-04-29 14:32:38 +00:00
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
2015-04-29 14:32:38 +00:00
# migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='SystemUser',
fields=[
2015-04-29 14:32:38 +00:00
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('username', models.CharField(validators=[orchestra.core.validators.validate_username], unique=True, help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, verbose_name='username')),
('password', models.CharField(max_length=128, verbose_name='password')),
2015-04-29 14:32:38 +00:00
('home', models.CharField(blank=True, max_length=256, help_text='Starting location when login with this no-shell user.', verbose_name='home')),
('directory', models.CharField(blank=True, max_length=256, help_text="Optional directory relative to user's home.", verbose_name='directory')),
('shell', models.CharField(default='/dev/null', max_length=32, choices=[('/dev/null', 'No shell, FTP only'), ('/bin/rssh', 'No shell, SFTP/RSYNC only'), ('/bin/bash', '/bin/bash'), ('/bin/sh', '/bin/sh')], verbose_name='shell')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
# ('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='systemusers', verbose_name='Account')),
('groups', models.ManyToManyField(to='systemusers.SystemUser', blank=True, help_text='A new group will be created for the user. Which additional groups would you like them to be a member of?')),
],
),
]