Show More
@@ -0,0 +1,73 b'' | |||
|
1 | # -*- coding: utf-8 -*- | |
|
2 | from south.utils import datetime_utils as datetime | |
|
3 | from south.db import db | |
|
4 | from south.v2 import SchemaMigration | |
|
5 | from django.db import models | |
|
6 | ||
|
7 | ||
|
8 | class Migration(SchemaMigration): | |
|
9 | ||
|
10 | def forwards(self, orm): | |
|
11 | # Deleting field 'Tag.linked' | |
|
12 | db.delete_column(u'boards_tag', 'linked_id') | |
|
13 | ||
|
14 | ||
|
15 | def backwards(self, orm): | |
|
16 | # Adding field 'Tag.linked' | |
|
17 | db.add_column(u'boards_tag', 'linked', | |
|
18 | self.gf('django.db.models.fields.related.ForeignKey')(to=orm['boards.Tag'], null=True, blank=True), | |
|
19 | keep_default=False) | |
|
20 | ||
|
21 | ||
|
22 | models = { | |
|
23 | 'boards.ban': { | |
|
24 | 'Meta': {'object_name': 'Ban'}, | |
|
25 | 'can_read': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | |
|
26 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
|
27 | 'ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39'}), | |
|
28 | 'reason': ('django.db.models.fields.CharField', [], {'default': "'Auto'", 'max_length': '200'}) | |
|
29 | }, | |
|
30 | 'boards.post': { | |
|
31 | 'Meta': {'ordering': "('id',)", 'object_name': 'Post'}, | |
|
32 | '_text_rendered': ('django.db.models.fields.TextField', [], {}), | |
|
33 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
|
34 | 'images': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'ip+'", 'to': "orm['boards.PostImage']", 'blank': 'True', 'symmetrical': 'False', 'null': 'True', 'db_index': 'True'}), | |
|
35 | 'last_edit_time': ('django.db.models.fields.DateTimeField', [], {}), | |
|
36 | 'poster_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39'}), | |
|
37 | 'poster_user_agent': ('django.db.models.fields.TextField', [], {}), | |
|
38 | 'pub_time': ('django.db.models.fields.DateTimeField', [], {}), | |
|
39 | 'referenced_posts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'rfp+'", 'to': "orm['boards.Post']", 'blank': 'True', 'symmetrical': 'False', 'null': 'True', 'db_index': 'True'}), | |
|
40 | 'refmap': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), | |
|
41 | 'text': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True'}), | |
|
42 | 'text_markup_type': ('django.db.models.fields.CharField', [], {'default': "'bbcode'", 'max_length': '30'}), | |
|
43 | 'thread_new': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['boards.Thread']", 'null': 'True'}), | |
|
44 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) | |
|
45 | }, | |
|
46 | 'boards.postimage': { | |
|
47 | 'Meta': {'ordering': "('id',)", 'object_name': 'PostImage'}, | |
|
48 | 'hash': ('django.db.models.fields.CharField', [], {'max_length': '36'}), | |
|
49 | 'height': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | |
|
50 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
|
51 | 'image': ('boards.thumbs.ImageWithThumbsField', [], {'max_length': '100', 'blank': 'True'}), | |
|
52 | 'pre_height': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | |
|
53 | 'pre_width': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | |
|
54 | 'width': ('django.db.models.fields.IntegerField', [], {'default': '0'}) | |
|
55 | }, | |
|
56 | 'boards.tag': { | |
|
57 | 'Meta': {'ordering': "('name',)", 'object_name': 'Tag'}, | |
|
58 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
|
59 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}), | |
|
60 | 'threads': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'tag+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['boards.Thread']"}) | |
|
61 | }, | |
|
62 | 'boards.thread': { | |
|
63 | 'Meta': {'object_name': 'Thread'}, | |
|
64 | 'archived': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
|
65 | 'bump_time': ('django.db.models.fields.DateTimeField', [], {}), | |
|
66 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
|
67 | 'last_edit_time': ('django.db.models.fields.DateTimeField', [], {}), | |
|
68 | 'replies': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'tre+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['boards.Post']"}), | |
|
69 | 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['boards.Tag']", 'symmetrical': 'False'}) | |
|
70 | } | |
|
71 | } | |
|
72 | ||
|
73 | complete_apps = ['boards'] No newline at end of file |
@@ -82,7 +82,8 b' class PostManager(models.Manager):' | |||
|
82 | 82 | Thread.objects.process_oldest_threads() |
|
83 | 83 | self.connect_replies(post) |
|
84 | 84 | |
|
85 |
logger.info('Created post #%d' % post.id |
|
|
85 | logger.info('Created post #%d with title %s' % (post.id, | |
|
86 | post.get_title())) | |
|
86 | 87 | |
|
87 | 88 | return post |
|
88 | 89 | |
@@ -103,7 +104,7 b' class PostManager(models.Manager):' | |||
|
103 | 104 | |
|
104 | 105 | post.delete() |
|
105 | 106 | |
|
106 | logger.info('Deleted post #%d' % post_id) | |
|
107 | logger.info('Deleted post #%d (%s)' % (post_id, post.get_title())) | |
|
107 | 108 | |
|
108 | 109 | def delete_posts_by_ip(self, ip): |
|
109 | 110 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now