annotate downloads/migrations/0001_initial.py @ 1184:fbfb1a9c70e2

Make donations business a list. Paypal is now returning a different business email in IPN messages.
author Brian Neal <bgneal@gmail.com>
date Sun, 17 Oct 2021 14:40:53 -0500
parents 5ba2508939f7
children
rev   line source
bgneal@1028 1 # -*- coding: utf-8 -*-
bgneal@1028 2 from __future__ import unicode_literals
bgneal@1028 3
bgneal@1028 4 from django.db import migrations, models
bgneal@1028 5 import downloads.models
bgneal@1028 6 from django.conf import settings
bgneal@1028 7
bgneal@1028 8
bgneal@1028 9 class Migration(migrations.Migration):
bgneal@1028 10
bgneal@1028 11 dependencies = [
bgneal@1028 12 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
bgneal@1028 13 ]
bgneal@1028 14
bgneal@1028 15 operations = [
bgneal@1028 16 migrations.CreateModel(
bgneal@1028 17 name='AllowedExtension',
bgneal@1028 18 fields=[
bgneal@1028 19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 20 ('extension', models.CharField(help_text=b'e.g. .txt', max_length=8)),
bgneal@1028 21 ],
bgneal@1028 22 options={
bgneal@1028 23 'ordering': ('extension',),
bgneal@1028 24 },
bgneal@1028 25 ),
bgneal@1028 26 migrations.CreateModel(
bgneal@1028 27 name='Category',
bgneal@1028 28 fields=[
bgneal@1028 29 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 30 ('title', models.CharField(max_length=64)),
bgneal@1028 31 ('slug', models.SlugField(max_length=64)),
bgneal@1028 32 ('description', models.TextField(blank=True)),
bgneal@1028 33 ('count', models.IntegerField(default=0, blank=True)),
bgneal@1028 34 ],
bgneal@1028 35 options={
bgneal@1028 36 'ordering': ('title',),
bgneal@1028 37 'verbose_name_plural': 'Categories',
bgneal@1028 38 },
bgneal@1028 39 ),
bgneal@1028 40 migrations.CreateModel(
bgneal@1028 41 name='Download',
bgneal@1028 42 fields=[
bgneal@1028 43 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 44 ('title', models.CharField(max_length=128)),
bgneal@1028 45 ('description', models.TextField()),
bgneal@1028 46 ('html', models.TextField(blank=True)),
bgneal@1028 47 ('file', models.FileField(upload_to=downloads.models.download_path)),
bgneal@1028 48 ('date_added', models.DateTimeField(db_index=True)),
bgneal@1028 49 ('ip_address', models.IPAddressField(verbose_name=b'IP Address')),
bgneal@1028 50 ('update_date', models.DateTimeField(db_index=True, blank=True)),
bgneal@1028 51 ('hits', models.IntegerField(default=0)),
bgneal@1028 52 ('average_score', models.FloatField(default=0.0)),
bgneal@1028 53 ('total_votes', models.IntegerField(default=0)),
bgneal@1028 54 ('is_public', models.BooleanField(default=False, db_index=True)),
bgneal@1028 55 ('category', models.ForeignKey(to='downloads.Category')),
bgneal@1028 56 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@1028 57 ],
bgneal@1028 58 options={
bgneal@1028 59 'abstract': False,
bgneal@1028 60 },
bgneal@1028 61 ),
bgneal@1028 62 migrations.CreateModel(
bgneal@1028 63 name='PendingDownload',
bgneal@1028 64 fields=[
bgneal@1028 65 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 66 ('title', models.CharField(max_length=128)),
bgneal@1028 67 ('description', models.TextField()),
bgneal@1028 68 ('html', models.TextField(blank=True)),
bgneal@1028 69 ('file', models.FileField(upload_to=downloads.models.download_path)),
bgneal@1028 70 ('date_added', models.DateTimeField(db_index=True)),
bgneal@1028 71 ('ip_address', models.IPAddressField(verbose_name=b'IP Address')),
bgneal@1028 72 ('update_date', models.DateTimeField(db_index=True, blank=True)),
bgneal@1028 73 ('category', models.ForeignKey(to='downloads.Category')),
bgneal@1028 74 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@1028 75 ],
bgneal@1028 76 options={
bgneal@1028 77 'ordering': ('date_added',),
bgneal@1028 78 },
bgneal@1028 79 ),
bgneal@1028 80 migrations.CreateModel(
bgneal@1028 81 name='VoteRecord',
bgneal@1028 82 fields=[
bgneal@1028 83 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 84 ('vote_date', models.DateTimeField(auto_now_add=True)),
bgneal@1028 85 ('download', models.ForeignKey(to='downloads.Download')),
bgneal@1028 86 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@1028 87 ],
bgneal@1028 88 options={
bgneal@1028 89 'ordering': ('-vote_date',),
bgneal@1028 90 },
bgneal@1028 91 ),
bgneal@1028 92 ]