"Fossies" - the Fresh Open Source Software Archive

Member "taiga-back-5.0.6/taiga/projects/userstories/migrations/0001_initial.py" (15 Jan 2020, 5226 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.utils.timezone
    7 import django.contrib.postgres.fields
    8 import django.db.models.deletion
    9 
   10 
   11 class Migration(migrations.Migration):
   12 
   13     dependencies = [
   14         ('issues', '__first__'),
   15         ('milestones', '__first__'),
   16         ('projects', '0002_auto_20140903_0920'),
   17         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
   18         ('users', '0003_auto_20140903_0925'),
   19     ]
   20 
   21     operations = [
   22         migrations.CreateModel(
   23             name='RolePoints',
   24             fields=[
   25                 ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
   26                 ('points', models.ForeignKey(verbose_name='points', to='projects.Points', related_name='role_points')),
   27                 ('role', models.ForeignKey(verbose_name='role', to='users.Role', related_name='role_points')),
   28             ],
   29             options={
   30                 'ordering': ['user_story', 'role'],
   31                 'verbose_name': 'role points',
   32                 'permissions': (('view_rolepoints', 'Can view role points'),),
   33                 'verbose_name_plural': 'role points',
   34             },
   35             bases=(models.Model,),
   36         ),
   37         migrations.CreateModel(
   38             name='UserStory',
   39             fields=[
   40                 ('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
   41                 ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(), blank=True, default=[], null=True, size=None, verbose_name='tags')),
   42                 ('version', models.IntegerField(default=1, verbose_name='version')),
   43                 ('is_blocked', models.BooleanField(default=False, verbose_name='is blocked')),
   44                 ('blocked_note', models.TextField(default='', blank=True, verbose_name='blocked note')),
   45                 ('ref', models.BigIntegerField(default=None, db_index=True, blank=True, null=True, verbose_name='ref')),
   46                 ('is_closed', models.BooleanField(default=False)),
   47                 ('is_archived', models.BooleanField(default=False, verbose_name='archived')),
   48                 ('order', models.PositiveSmallIntegerField(default=100, verbose_name='order')),
   49                 ('created_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created date')),
   50                 ('modified_date', models.DateTimeField(verbose_name='modified date')),
   51                 ('finish_date', models.DateTimeField(blank=True, null=True, verbose_name='finish date')),
   52                 ('subject', models.TextField(verbose_name='subject')),
   53                 ('description', models.TextField(blank=True, verbose_name='description')),
   54                 ('client_requirement', models.BooleanField(default=False, verbose_name='is client requirement')),
   55                 ('team_requirement', models.BooleanField(default=False, verbose_name='is team requirement')),
   56                 ('assigned_to', models.ForeignKey(null=True, verbose_name='assigned to', to=settings.AUTH_USER_MODEL, related_name='userstories_assigned_to_me', blank=True, default=None)),
   57                 ('generated_from_issue', models.ForeignKey(blank=True, null=True, verbose_name='generated from issue', to='issues.Issue', related_name='generated_user_stories')),
   58                 ('milestone', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='milestone', to='milestones.Milestone', related_name='user_stories', blank=True, default=None)),
   59                 ('owner', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, null=True, verbose_name='owner', to=settings.AUTH_USER_MODEL, related_name='owned_user_stories')),
   60                 ('points', models.ManyToManyField(through='userstories.RolePoints', related_name='userstories', to='projects.Points', verbose_name='points')),
   61                 ('project', models.ForeignKey(verbose_name='project', to='projects.Project', related_name='user_stories')),
   62                 ('status', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, null=True, verbose_name='status', to='projects.UserStoryStatus', related_name='user_stories')),
   63                 ('watchers', models.ManyToManyField(to=settings.AUTH_USER_MODEL, related_name='userstories_userstory+', blank=True, null=True, verbose_name='watchers')),
   64             ],
   65             options={
   66                 'ordering': ['project', 'order', 'ref'],
   67                 'verbose_name': 'user story',
   68                 'permissions': (('view_userstory', 'Can view user story'),),
   69                 'verbose_name_plural': 'user stories',
   70             },
   71             bases=(models.Model,),
   72         ),
   73         migrations.AddField(
   74             model_name='rolepoints',
   75             name='user_story',
   76             field=models.ForeignKey(verbose_name='user story', to='userstories.UserStory', related_name='role_points'),
   77             preserve_default=True,
   78         ),
   79         migrations.AlterUniqueTogether(
   80             name='rolepoints',
   81             unique_together=set([('user_story', 'role')]),
   82         ),
   83     ]