##// END OF EJS Templates
Added ability to add links to specific domains and show the domain logo as an image substitute
Added ability to add links to specific domains and show the domain logo as an image substitute

File last commit:

r1590:0eb7ac3c default
r1695:6ee0d7fe default
Show More
0001_initial.py
112 lines | 4.5 KiB | text/x-python | PythonLexer
neko259
Added initial django 1.7 migration
r873 # -*- 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()),
neko259
Removed django-markupfield as it is incompatible with the new migrations. Use 2 fields for storing raw and rendered text and work with them directly
r881 ('text', models.TextField(null=True, blank=True)),
neko259
Added initial django 1.7 migration
r873 ('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)),
neko259
Deduplicated upload_to method for images and file attachments
r1368 ('image', boards.thumbs.ImageWithThumbsField(height_field='height', width_field='width', blank=True)),
neko259
Added initial django 1.7 migration
r873 ('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,
),
]