| author | Tero Marttila <terom@fixme.fi> |
| Sun, 18 Aug 2013 23:12:54 +0300 | |
| changeset 47 | 35a8e63648c8 |
| permissions | -rw-r--r-- |
|
47
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
1 |
# -*- coding: utf-8 -*- |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
2 |
import datetime |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
3 |
from south.db import db |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
4 |
from south.v2 import SchemaMigration |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
5 |
from django.db import models |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
6 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
7 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
8 |
class Migration(SchemaMigration): |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
9 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
10 |
def forwards(self, orm): |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
11 |
# Fix naming |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
12 |
db.rename_column('qrurls_url', 'publishing_schedule', 'publishing_time')
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
13 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
14 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
15 |
def backwards(self, orm): |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
16 |
# Revert naming |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
17 |
db.rename_column('qrurls_url', 'publishing_time', 'publishing_schedule')
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
18 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
19 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
20 |
models = {
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
21 |
u'qrurls.url': {
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
22 |
'Meta': {'object_name': 'URL'},
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
23 |
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
24 |
'publishing_time': ('django.db.models.fields.TimeField', [], {'default': 'datetime.time(0, 0)'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
25 |
'shorturl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
26 |
}, |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
27 |
u'qrurls.urlimage': {
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
28 |
'Meta': {'ordering': "['uploaded']", 'object_name': 'URLImage'},
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
29 |
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
30 |
'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
31 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
32 |
'uploaded': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
33 |
}, |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
34 |
u'qrurls.urlitem': {
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
35 |
'Meta': {'ordering': "['published']", 'object_name': 'URLItem'},
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
36 |
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
37 |
'image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['qrurls.URLImage']", 'null': 'True', 'blank': 'True'}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
38 |
'published': ('django.db.models.fields.DateTimeField', [], {}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
39 |
'shorturl': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['qrurls.URL']"}),
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
40 |
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
41 |
} |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
42 |
} |
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
43 |
|
|
35a8e63648c8
clarify timezones used for URLItem.published, but no actual explicit per-URLFeed timezone..
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
44 |
complete_apps = ['qrurls'] |