"Fossies" - the Fresh Open Source Software Archive

Member "taiga-back-5.0.6/taiga/projects/migrations/0001_initial.py" (15 Jan 2020, 6886 Bytes) of package /linux/www/taiga-back-5.0.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "0001_initial.py" see the Fossies "Dox" file reference documentation.

    1 # -*- coding: utf-8 -*-
    2 from __future__ import unicode_literals
    3 
    4 from django.db import models, migrations
    5 from django.conf import settings
    6 import django.contrib.postgres.fields
    7 import django.utils.timezone
    8 import django.db.models.deletion
    9 import taiga.projects.history.models
   10 
   11 
   12 class Migration(migrations.Migration):
   13 
   14     dependencies = [
   15         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
   16         ('users', '0002_auto_20140903_0916'),
   17     ]
   18 
   19     operations = [
   20         migrations.CreateModel(
   21             name='Membership',
   22             fields=[
   23                 ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
   24                 ('is_owner', models.BooleanField(default=False)),
   25                 ('email', models.EmailField(max_length=255, null=True, default=None, verbose_name='email', blank=True)),
   26                 ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='creado el')),
   27                 ('token', models.CharField(max_length=60, null=True, default=None, verbose_name='token', blank=True)),
   28                 ('invited_by_id', models.IntegerField(null=True, blank=True)),
   29             ],
   30             options={
   31                 'ordering': ['project', 'user__full_name', 'user__username', 'user__email', 'email'],
   32                 'verbose_name_plural': 'membershipss',
   33                 'permissions': (('view_membership', 'Can view membership'),),
   34                 'verbose_name': 'membership',
   35             },
   36             bases=(models.Model,),
   37         ),
   38         migrations.CreateModel(
   39             name='Project',
   40             fields=[
   41                 ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
   42                 ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(), blank=True, default=[], null=True, size=None, verbose_name='tags')),
   43                 ('name', models.CharField(max_length=250, unique=True, verbose_name='name')),
   44                 ('slug', models.SlugField(max_length=250, unique=True, verbose_name='slug', blank=True)),
   45                 ('description', models.TextField(verbose_name='description')),
   46                 ('created_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created date')),
   47                 ('modified_date', models.DateTimeField(verbose_name='modified date')),
   48                 ('total_milestones', models.IntegerField(null=True, default=0, verbose_name='total of milestones', blank=True)),
   49                 ('total_story_points', models.FloatField(default=0, verbose_name='total story points')),
   50                 ('is_backlog_activated', models.BooleanField(default=True, verbose_name='active backlog panel')),
   51                 ('is_kanban_activated', models.BooleanField(default=False, verbose_name='active kanban panel')),
   52                 ('is_wiki_activated', models.BooleanField(default=True, verbose_name='active wiki panel')),
   53                 ('is_issues_activated', models.BooleanField(default=True, verbose_name='active issues panel')),
   54                 ('videoconferences', models.CharField(max_length=250, null=True, choices=[('appear-in', 'AppearIn'), ('talky', 'Talky')], verbose_name='videoconference system', blank=True)),
   55                 ('videoconferences_salt', models.CharField(max_length=250, null=True, verbose_name='videoconference room salt', blank=True)),
   56                 ('anon_permissions', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(choices=[('view_project', 'View project'), ('view_milestones', 'View milestones'), ('view_us', 'View user stories'), ('view_tasks', 'View tasks'), ('view_issues', 'View issues'), ('view_wiki_pages', 'View wiki pages'), ('view_wiki_links', 'View wiki links')]), blank=True, default=[], null=True, size=None, verbose_name='anonymous permissions')),
   57                 ('public_permissions', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(choices=[('view_project', 'View project'), ('view_milestones', 'View milestones'), ('view_us', 'View user stories'), ('view_issues', 'View issues'), ('vote_issues', 'Vote issues'), ('view_tasks', 'View tasks'), ('view_wiki_pages', 'View wiki pages'), ('view_wiki_links', 'View wiki links'), ('request_membership', 'Request membership'), ('add_us_to_project', 'Add user story to project'), ('add_comments_to_us', 'Add comments to user stories'), ('add_comments_to_task', 'Add comments to tasks'), ('add_issue', 'Add issues'), ('add_comments_issue', 'Add comments to issues'), ('add_wiki_page', 'Add wiki page'), ('modify_wiki_page', 'Modify wiki page'), ('add_wiki_link', 'Add wiki link'), ('modify_wiki_link', 'Modify wiki link')]), blank=True, default=[], null=True, size=None, verbose_name='user permissions')),
   58                 ('is_private', models.BooleanField(default=False, verbose_name='is private')),
   59                 ('tags_colors', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, null=True), size=2), blank=True, default=[], null=True, size=None, verbose_name='tags colors')),
   60             ],
   61             options={
   62                 'ordering': ['name'],
   63                 'verbose_name_plural': 'projects',
   64                 'permissions': (('view_project', 'Can view project'),),
   65                 'verbose_name': 'project',
   66             },
   67             bases=(models.Model,),
   68         ),
   69         migrations.AddField(
   70             model_name='project',
   71             name='members',
   72             field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, related_name='projects', verbose_name='members', through='projects.Membership'),
   73             preserve_default=True,
   74         ),
   75         migrations.AddField(
   76             model_name='project',
   77             name='owner',
   78             field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='owned_projects', verbose_name='owner'),
   79             preserve_default=True,
   80         ),
   81 
   82         migrations.AddField(
   83             model_name='membership',
   84             name='user',
   85             field=models.ForeignKey(blank=True, default=None, to=settings.AUTH_USER_MODEL, null=True, related_name='memberships'),
   86             preserve_default=True,
   87         ),
   88 
   89         migrations.AddField(
   90             model_name='membership',
   91             name='project',
   92             field=models.ForeignKey(default=1, to='projects.Project', related_name='memberships'),
   93             preserve_default=False,
   94         ),
   95 
   96         migrations.AlterUniqueTogether(
   97             name='membership',
   98             unique_together=set([('user', 'project')]),
   99         ),
  100 
  101         migrations.AddField(
  102             model_name='membership',
  103             name='role',
  104             field=models.ForeignKey(related_name='memberships', to='users.Role', default=1),
  105             preserve_default=False,
  106         ),
  107     ]