##// END OF EJS Templates
Add default tag instead of raising an error when no section is specified
Add default tag instead of raising an error when no section is specified

File last commit:

r1590:0eb7ac3c default
r1655:3877b64d default
Show More
0001_initial.py
112 lines | 4.5 KiB | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import boards.models.base
import boards.thumbs
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ban',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('ip', models.GenericIPAddressField()),
('reason', models.CharField(max_length=200, default='Auto')),
('can_read', models.BooleanField(default=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Post',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('pub_time', models.DateTimeField()),
('text', models.TextField(null=True, blank=True)),
('text_markup_type', models.CharField(choices=[('', '--'), ('bbcode', 'bbcode')], max_length=30, default='bbcode')),
('poster_ip', models.GenericIPAddressField()),
('_text_rendered', models.TextField(editable=False)),
('poster_user_agent', models.TextField()),
('last_edit_time', models.DateTimeField()),
('refmap', models.TextField(null=True, blank=True)),
],
options={
'ordering': ('id',),
},
bases=(models.Model, boards.models.base.Viewable),
),
migrations.CreateModel(
name='PostImage',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('width', models.IntegerField(default=0)),
('height', models.IntegerField(default=0)),
('pre_width', models.IntegerField(default=0)),
('pre_height', models.IntegerField(default=0)),
('image', boards.thumbs.ImageWithThumbsField(height_field='height', width_field='width', blank=True)),
('hash', models.CharField(max_length=36)),
],
options={
'ordering': ('id',),
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Tag',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('name', models.CharField(db_index=True, max_length=100)),
],
options={
'ordering': ('name',),
},
bases=(models.Model, boards.models.base.Viewable),
),
migrations.CreateModel(
name='Thread',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('bump_time', models.DateTimeField()),
('last_edit_time', models.DateTimeField()),
('archived', models.BooleanField(default=False)),
('bumpable', models.BooleanField(default=True)),
('replies', models.ManyToManyField(null=True, related_name='tre+', to='boards.Post', blank=True)),
('tags', models.ManyToManyField(to='boards.Tag')),
],
options={
},
bases=(models.Model,),
),
migrations.AddField(
model_name='tag',
name='threads',
field=models.ManyToManyField(null=True, related_name='tag+', to='boards.Thread', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='post',
name='images',
field=models.ManyToManyField(null=True, db_index=True, related_name='ip+', to='boards.PostImage', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='post',
name='referenced_posts',
field=models.ManyToManyField(null=True, db_index=True, related_name='rfp+', to='boards.Post', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='post',
name='thread_new',
field=models.ForeignKey(null=True, default=None, to='boards.Thread'),
preserve_default=True,
),
]