"Fossies" - the Fresh Open Source Software Archive

Member "taiga-back-5.0.6/taiga/projects/attachments/migrations/0001_initial.py" (15 Jan 2020, 2130 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 import taiga.projects.attachments.models
    6 from django.conf import settings
    7 import django.utils.timezone
    8 
    9 
   10 class Migration(migrations.Migration):
   11     dependencies = [
   12         ('contenttypes', '0001_initial'),
   13         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
   14         ('projects', '0002_auto_20140903_0920'),
   15     ]
   16 
   17     operations = [
   18         migrations.CreateModel(
   19             name='Attachment',
   20             fields=[
   21                 ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
   22                 ('object_id', models.PositiveIntegerField(verbose_name='object id')),
   23                 ('created_date', models.DateTimeField(verbose_name='created date', default=django.utils.timezone.now)),
   24                 ('modified_date', models.DateTimeField(verbose_name='modified date')),
   25                 ('attached_file', models.FileField(verbose_name='attached file', upload_to=taiga.projects.attachments.models.get_attachment_file_path, blank=True, null=True, max_length=500)),
   26                 ('is_deprecated', models.BooleanField(verbose_name='is deprecated', default=False)),
   27                 ('description', models.TextField(verbose_name='description', blank=True)),
   28                 ('order', models.IntegerField(verbose_name='order', default=0)),
   29                 ('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')),
   30                 ('owner', models.ForeignKey(verbose_name='owner', null=True, related_name='change_attachments', to=settings.AUTH_USER_MODEL)),
   31                 ('project', models.ForeignKey(verbose_name='project', related_name='attachments', to='projects.Project')),
   32             ],
   33             options={
   34                 'ordering': ['project', 'created_date'],
   35                 'verbose_name': 'attachment',
   36                 'permissions': (('view_attachment', 'Can view attachment'),),
   37                 'verbose_name_plural': 'attachments',
   38             },
   39             bases=(models.Model,),
   40         ),
   41     ]