"Fossies" - the Fresh Open Source Software Archive

Member "seahub-7.1.0-pro/thirdpart/termsandconditions/migrations/0001_initial.py" (30 Dec 2019, 2326 Bytes) of package /linux/www/seahub-7.1.0-pro.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.

    1 # -*- coding: utf-8 -*-
    2 
    3 
    4 from django.db import migrations, models
    5 import seahub.base.fields
    6 
    7 
    8 class Migration(migrations.Migration):
    9 
   10     dependencies = [
   11     ]
   12 
   13     operations = [
   14         migrations.CreateModel(
   15             name='TermsAndConditions',
   16             fields=[
   17                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
   18                 ('slug', models.SlugField(default=b'site-terms')),
   19                 ('name', models.TextField(max_length=255)),
   20                 ('version_number', models.DecimalField(default=1.0, max_digits=6, decimal_places=2)),
   21                 ('text', models.TextField(null=True, blank=True)),
   22                 ('info', models.TextField(help_text=b"Provide users with some info about what's changed and why", null=True, blank=True)),
   23                 ('date_active', models.DateTimeField(help_text=b'Leave Null To Never Make Active', null=True, blank=True)),
   24                 ('date_created', models.DateTimeField(auto_now_add=True)),
   25             ],
   26             options={
   27                 'ordering': ['-date_active'],
   28                 'get_latest_by': 'date_active',
   29                 'verbose_name': 'Terms and Conditions',
   30                 'verbose_name_plural': 'Terms and Conditions',
   31             },
   32         ),
   33         migrations.CreateModel(
   34             name='UserTermsAndConditions',
   35             fields=[
   36                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
   37                 ('username', seahub.base.fields.LowerCaseCharField(max_length=255)),
   38                 ('ip_address', models.GenericIPAddressField(null=True, verbose_name=b'IP Address', blank=True)),
   39                 ('date_accepted', models.DateTimeField(auto_now_add=True, verbose_name=b'Date Accepted')),
   40                 ('terms', models.ForeignKey(related_name='userterms', to='termsandconditions.TermsAndConditions')),
   41             ],
   42             options={
   43                 'get_latest_by': 'date_accepted',
   44                 'verbose_name': 'User Terms and Conditions',
   45                 'verbose_name_plural': 'User Terms and Conditions',
   46             },
   47         ),
   48         migrations.AlterUniqueTogether(
   49             name='usertermsandconditions',
   50             unique_together={('username', 'terms')},
   51         ),
   52     ]