add some fields, fix year group
This commit is contained in:
parent
57f06bdfd7
commit
cbf25a6f6f
4 changed files with 471 additions and 14 deletions
234
pandora/backend/migrations/0004_add_dialog.py
Normal file
234
pandora/backend/migrations/0004_add_dialog.py
Normal file
|
@ -0,0 +1,234 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from south.db import db
|
||||
from django.db import models
|
||||
from backend.models import *
|
||||
|
||||
class Migration:
|
||||
|
||||
def forwards(self, orm):
|
||||
|
||||
# Adding field 'Layer.start'
|
||||
db.add_column('backend_layer', 'start', orm['backend.layer:start'])
|
||||
|
||||
# Adding field 'Layer.stop'
|
||||
db.add_column('backend_layer', 'stop', orm['backend.layer:stop'])
|
||||
|
||||
# Adding field 'MovieFind.dialog'
|
||||
db.add_column('backend_moviefind', 'dialog', orm['backend.moviefind:dialog'])
|
||||
|
||||
# Deleting field 'Layer.time_in'
|
||||
db.delete_column('backend_layer', 'time_in')
|
||||
|
||||
# Deleting field 'Layer.time_out'
|
||||
db.delete_column('backend_layer', 'time_out')
|
||||
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Deleting field 'Layer.start'
|
||||
db.delete_column('backend_layer', 'start')
|
||||
|
||||
# Deleting field 'Layer.stop'
|
||||
db.delete_column('backend_layer', 'stop')
|
||||
|
||||
# Deleting field 'MovieFind.dialog'
|
||||
db.delete_column('backend_moviefind', 'dialog')
|
||||
|
||||
# Adding field 'Layer.time_in'
|
||||
db.add_column('backend_layer', 'time_in', orm['backend.layer:time_in'])
|
||||
|
||||
# Adding field 'Layer.time_out'
|
||||
db.add_column('backend_layer', 'time_out', orm['backend.layer:time_out'])
|
||||
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
'auth.permission': {
|
||||
'Meta': {'unique_together': "(('content_type', 'codename'),)"},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
'auth.user': {
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
'backend.collection': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
|
||||
'subdomain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '2048'}),
|
||||
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'})
|
||||
},
|
||||
'backend.facet': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'key': ('django.db.models.fields.CharField', [], {'max_length': '200', 'db_index': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'facets'", 'to': "orm['backend.Movie']"}),
|
||||
'value': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
|
||||
'value_sort': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
'backend.layer': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"}),
|
||||
'start': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'stop': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
|
||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
|
||||
'value': ('django.db.models.fields.TextField', [], {})
|
||||
},
|
||||
'backend.list': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['backend.Movie']", 'symmetrical': 'False'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
|
||||
'public': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||
},
|
||||
'backend.listitem': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.List']"}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"})
|
||||
},
|
||||
'backend.location': {
|
||||
'area': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lat_center': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lat_ne': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lat_sw': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_center': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_ne': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_sw': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'manual': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['backend.Movie']", 'symmetrical': 'False'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
|
||||
},
|
||||
'backend.movie': {
|
||||
'available': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'imdb': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'json': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'metadata': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movieId': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'blank': 'True'}),
|
||||
'oxdbId': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '42', 'blank': 'True'}),
|
||||
'poster_height': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
|
||||
'poster_width': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
|
||||
'published': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'scene_height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'stream_high': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'}),
|
||||
'stream_low': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'}),
|
||||
'stream_mid': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'})
|
||||
},
|
||||
'backend.moviefind': {
|
||||
'actor': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'all': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'character': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'cinematographer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'country': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'dialog': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'director': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'editor': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'filename': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'genre': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'keyword': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'language': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'location': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'find'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['backend.Movie']"}),
|
||||
'producer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'trivia': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'writer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'year': ('django.db.models.fields.CharField', [], {'max_length': '4'})
|
||||
},
|
||||
'backend.moviesort': {
|
||||
'aspectratio': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'bitrate': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cast': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cinematographer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cinematographer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'connections': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'country': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'country_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'director': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'director_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'duration': ('django.db.models.fields.FloatField', [], {'default': '-1', 'db_index': 'True'}),
|
||||
'editor': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'editor_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'filename': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'files': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'genre': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'keywords': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'language': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'language_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'sort'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['backend.Movie']"}),
|
||||
'movieId': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
|
||||
'pixels': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'producer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'producer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'rating': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'resolution': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'risk': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'runtime': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'scenes': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'size': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'db_index': 'True'}),
|
||||
'title_desc': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'db_index': 'True'}),
|
||||
'trivia': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'votes': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'words': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'wpm': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'writer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'writer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'year': ('django.db.models.fields.CharField', [], {'max_length': '4', 'db_index': 'True'}),
|
||||
'year_desc': ('django.db.models.fields.CharField', [], {'max_length': '4', 'db_index': 'True'})
|
||||
},
|
||||
'backend.person': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'imdbId': ('django.db.models.fields.CharField', [], {'max_length': '7', 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
|
||||
'name_sort': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
'backend.reviewwhitelist': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
|
||||
'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
|
||||
},
|
||||
'contenttypes.contenttype': {
|
||||
'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['backend']
|
211
pandora/backend/migrations/0005_dialog_sort.py
Normal file
211
pandora/backend/migrations/0005_dialog_sort.py
Normal file
|
@ -0,0 +1,211 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from south.db import db
|
||||
from django.db import models
|
||||
from backend.models import *
|
||||
|
||||
class Migration:
|
||||
|
||||
def forwards(self, orm):
|
||||
|
||||
# Adding field 'MovieSort.dialog'
|
||||
db.add_column('backend_moviesort', 'dialog', orm['backend.moviesort:dialog'])
|
||||
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Deleting field 'MovieSort.dialog'
|
||||
db.delete_column('backend_moviesort', 'dialog')
|
||||
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
'auth.permission': {
|
||||
'Meta': {'unique_together': "(('content_type', 'codename'),)"},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
'auth.user': {
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
'backend.collection': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
|
||||
'subdomain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '2048'}),
|
||||
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'})
|
||||
},
|
||||
'backend.facet': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'key': ('django.db.models.fields.CharField', [], {'max_length': '200', 'db_index': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'facets'", 'to': "orm['backend.Movie']"}),
|
||||
'value': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
|
||||
'value_sort': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
'backend.layer': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"}),
|
||||
'start': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'stop': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
|
||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
|
||||
'value': ('django.db.models.fields.TextField', [], {})
|
||||
},
|
||||
'backend.list': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['backend.Movie']", 'symmetrical': 'False'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
|
||||
'public': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||
},
|
||||
'backend.listitem': {
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.List']"}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['backend.Movie']"})
|
||||
},
|
||||
'backend.location': {
|
||||
'area': ('django.db.models.fields.FloatField', [], {'default': '-1'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lat_center': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lat_ne': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lat_sw': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_center': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_ne': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'lng_sw': ('django.db.models.fields.FloatField', [], {'default': '0'}),
|
||||
'manual': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
|
||||
'movies': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['backend.Movie']", 'symmetrical': 'False'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
|
||||
},
|
||||
'backend.movie': {
|
||||
'available': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'imdb': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'json': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'metadata': ('fields.DictField', [], {'default': '{}', 'editable': 'False'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'movieId': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'blank': 'True'}),
|
||||
'oxdbId': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '42', 'blank': 'True'}),
|
||||
'poster_height': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
|
||||
'poster_width': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
|
||||
'published': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'scene_height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'stream_high': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'}),
|
||||
'stream_low': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'}),
|
||||
'stream_mid': ('django.db.models.fields.files.FileField', [], {'default': 'None', 'max_length': '100', 'blank': 'True'})
|
||||
},
|
||||
'backend.moviefind': {
|
||||
'actor': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'all': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'character': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'cinematographer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'country': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'dialog': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'director': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'editor': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'filename': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'genre': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'keyword': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'language': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'location': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'find'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['backend.Movie']"}),
|
||||
'producer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'trivia': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'writer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
|
||||
'year': ('django.db.models.fields.CharField', [], {'max_length': '4'})
|
||||
},
|
||||
'backend.moviesort': {
|
||||
'aspectratio': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'bitrate': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cast': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cinematographer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'cinematographer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'connections': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'country': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'country_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'dialog': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'director': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'director_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'duration': ('django.db.models.fields.FloatField', [], {'default': '-1', 'db_index': 'True'}),
|
||||
'editor': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'editor_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'filename': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'files': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'genre': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'keywords': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'language': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'language_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'movie': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'sort'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['backend.Movie']"}),
|
||||
'movieId': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
|
||||
'pixels': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'producer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'producer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'rating': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'resolution': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'risk': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'runtime': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'scenes': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'size': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'db_index': 'True'}),
|
||||
'title_desc': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'db_index': 'True'}),
|
||||
'trivia': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'votes': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'words': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'wpm': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||
'writer': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'writer_desc': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
|
||||
'year': ('django.db.models.fields.CharField', [], {'max_length': '4', 'db_index': 'True'}),
|
||||
'year_desc': ('django.db.models.fields.CharField', [], {'max_length': '4', 'db_index': 'True'})
|
||||
},
|
||||
'backend.person': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'imdbId': ('django.db.models.fields.CharField', [], {'max_length': '7', 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
|
||||
'name_sort': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
'backend.reviewwhitelist': {
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
|
||||
'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
|
||||
},
|
||||
'contenttypes.contenttype': {
|
||||
'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['backend']
|
|
@ -260,7 +260,9 @@ class Movie(models.Model):
|
|||
f.trivia = ' '.join(self.get('trivia', []))
|
||||
f.location = '|%s|'%'|'.join(self.get('filming_locations', []))
|
||||
|
||||
f.dialog = 'fixme'
|
||||
#FIXME:
|
||||
#f.dialog = 'fixme'
|
||||
f.dialog = '\n'.join([l.value for l in Layer.objects.filter(type='subtitle', movie=self).order_by('start')])
|
||||
|
||||
#FIXME: collate filenames
|
||||
#f.filename = self.filename
|
||||
|
@ -312,12 +314,13 @@ class Movie(models.Model):
|
|||
s.summary = len(self.get('plot', '').split())
|
||||
s.trivia = len(self.get('trivia', []))
|
||||
s.connections = len(self.get('connections', []))
|
||||
s.movieId = self.movieId
|
||||
s.movieId = self.movieId.replace('0x', 'xx')
|
||||
s.rating = self.get('rating', -1)
|
||||
s.votes = self.get('votes', -1)
|
||||
|
||||
# data from related subtitles
|
||||
s.scenes = 0 #FIXME
|
||||
s.dialog = 0 #FIXME
|
||||
s.words = 0 #FIXME
|
||||
s.wpm = 0 #FIXME
|
||||
s.risk = 0 #FIXME
|
||||
|
@ -338,6 +341,7 @@ class Movie(models.Model):
|
|||
if not s.year:
|
||||
s.year_desc = '';
|
||||
s.year = '9999';
|
||||
#FIXME: also deal with number based rows like genre, keywords etc
|
||||
s.save()
|
||||
|
||||
def updateFacets(self):
|
||||
|
@ -361,6 +365,12 @@ class Movie(models.Model):
|
|||
f = Facet(key=key, value=value, value_sort=value_sort)
|
||||
f.movie = self
|
||||
f.save()
|
||||
year = self.get('year', None)
|
||||
if year:
|
||||
f, created = Facet.objects.get_or_create(key='year', value=year, value_sort=year, movie=self)
|
||||
else:
|
||||
Facet.objects.filter(movie=self, key='year').delete()
|
||||
|
||||
|
||||
class MovieFind(models.Model):
|
||||
"""
|
||||
|
@ -380,6 +390,8 @@ class MovieFind(models.Model):
|
|||
cinematographer = models.TextField(blank=True, default='')
|
||||
actor = models.TextField(blank=True, default='')
|
||||
character = models.TextField(blank=True, default='')
|
||||
|
||||
dialog = models.TextField(blank=True, default='')
|
||||
#person
|
||||
|
||||
genre = models.TextField(blank=True)
|
||||
|
@ -433,6 +445,7 @@ class MovieSort(models.Model):
|
|||
rating = models.FloatField(blank=True, db_index=True)
|
||||
votes = models.IntegerField(blank=True, db_index=True)
|
||||
scenes = models.IntegerField(blank=True, db_index=True)
|
||||
dialog = models.IntegerField(null=True, blank=True, db_index=True)
|
||||
words = models.IntegerField(null=True, blank=True, db_index=True)
|
||||
wpm = models.IntegerField('Words per Minute', null=True, blank=True, db_index=True)
|
||||
risk = models.IntegerField(null=True, blank=True, db_index=True)
|
||||
|
@ -590,14 +603,15 @@ class ListItem(models.Model):
|
|||
return u'%s in %s' % (unicode(self.movie), unicode(self.list))
|
||||
|
||||
class Layer(models.Model):
|
||||
#FIXME: here having a movie,start index would be good
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
modified = models.DateTimeField(auto_now=True)
|
||||
user = models.ForeignKey(User)
|
||||
movie = models.ForeignKey(Movie)
|
||||
|
||||
#seconds
|
||||
time_in = models.FloatField(default=-1)
|
||||
time_out = models.FloatField(default=-1)
|
||||
start = models.FloatField(default=-1)
|
||||
stop = models.FloatField(default=-1)
|
||||
|
||||
type = models.CharField(blank=True, max_length=255)
|
||||
value = models.TextField()
|
||||
|
|
|
@ -192,15 +192,10 @@ Positions
|
|||
response['data']['items'] = []
|
||||
items = 'movies'
|
||||
movie_qs = query['qs']
|
||||
if query['group'] == "year":
|
||||
qs = models.MovieSort.objects.filter(movie__id__in=movie_qs).values('year').annotate(movies=Count('year'))
|
||||
name='year'
|
||||
name_sort='year'
|
||||
else:
|
||||
qs = models.Facet.objects.filter(key=query['group']).filter(movie__id__in=movie_qs)
|
||||
qs = qs.values('value').annotate(movies=Count('id')).order_by()
|
||||
name = 'value'
|
||||
name_sort = 'value_sort'
|
||||
qs = models.Facet.objects.filter(key=query['group']).filter(movie__id__in=movie_qs)
|
||||
qs = qs.values('value').annotate(movies=Count('id')).order_by()
|
||||
name = 'value'
|
||||
name_sort = 'value_sort'
|
||||
|
||||
#replace normalized items/name sort with actual db value
|
||||
for i in range(0, len(query['sort'])):
|
||||
|
@ -217,7 +212,10 @@ Positions
|
|||
|
||||
elif 'range' in data:
|
||||
qs = qs[query['range'][0]:query['range'][1]]
|
||||
response['data']['items'] = [{'name': i[name], 'items': i[items]} for i in qs]
|
||||
if name == 'year':
|
||||
response['data']['items'] = [{'name': i.year, 'items': i.movies} for i in qs]
|
||||
else:
|
||||
response['data']['items'] = [{'name': i[name], 'items': i[items]} for i in qs]
|
||||
else:
|
||||
response['data']['items'] = qs.count()
|
||||
elif 'ids' in query:
|
||||
|
|
Loading…
Reference in a new issue