Permalink
Browse files

Merge branch 'x-data-model-refactor' into dev

  • Loading branch information...
2 parents 7ae2f68 + 695e659 commit e9338ae11a64b41cbacb441cb69fbd85df5af6c5 @sjl sjl committed Sep 10, 2012
Showing with 6,527 additions and 6 deletions.
  1. +2 −1 .gitignore
  2. 0 apps/subtitles/__init__.py
  3. +140 −0 apps/subtitles/admin.py
  4. +75 −0 apps/subtitles/compat.py
  5. +314 −0 apps/subtitles/migrations/0001_initial.py
  6. +272 −0 apps/subtitles/migrations/0002_auto__add_collaborator.py
  7. +263 −0 apps/subtitles/migrations/0003_auto__add_field_subtitleversion_visibility_override.py
  8. +292 −0 ...btitles/migrations/0004_auto__add_field_subtitlelanguage_official_signoff_count__add_field_sub.py
  9. +284 −0 apps/subtitles/migrations/0005_auto.py
  10. +270 −0 apps/subtitles/migrations/0006_auto__add_field_subtitleversion_note.py
  11. 0 apps/subtitles/migrations/__init__.py
  12. +716 −0 apps/subtitles/models.py
  13. +193 −0 apps/subtitles/pipeline.py
  14. +2 −0 apps/subtitles/tests/__init__.py
  15. +153 −0 apps/subtitles/tests/compat.py
  16. +1,289 −0 apps/subtitles/tests/models.py
  17. +572 −0 apps/subtitles/tests/pipeline.py
  18. +62 −0 apps/subtitles/tests/utils.py
  19. +5 −2 apps/videos/admin.py
  20. +2 −2 apps/videos/forms.py
  21. +336 −0 apps/videos/migrations/0145_auto__add_field_video_primary_audio_language.py
  22. +366 −0 apps/videos/migrations/0146_fill_primary_audio_language.py
  23. +333 −0 apps/videos/migrations/0147_rename_pal_to_palc.py
  24. +3 −0 apps/videos/models.py
  25. +1 −0 deploy/requirements.txt
  26. +1 −0 docs/index.rst
  27. +13 −0 docs/model-refactor.rst
  28. +53 −0 docs/subtitle-storage.rst
  29. +5 −0 graph-history.sh
  30. +1 −0 libs/dxfpy/__init__.py
  31. +182 −0 libs/dxfpy/dxfpy.py
  32. +1 −0 libs/dxfpy/tests/__init__.py
  33. +83 −0 libs/dxfpy/tests/data.py
  34. +105 −0 libs/dxfpy/tests/serialization.py
  35. +1 −1 optional/unisubs-integration
  36. +1 −0 settings.py
  37. +26 −0 utils/chunkediter.py
  38. +37 −0 utils/compress.py
  39. +73 −0 utils/tests.py
View
3 .gitignore
@@ -66,7 +66,8 @@ media/static-cache
.ropeproject
/tags
/tags.bak
+history.png
+history.dot
apps/webdriver_testing/Screenshots/*.png
apps/webdriver_testing/Screenshots/nosetests.xml
apps/webdriver_testing/Screenshots/results.html
-
View
0 apps/subtitles/__init__.py
No changes.
View
140 apps/subtitles/admin.py
@@ -0,0 +1,140 @@
+# -*- coding: utf-8 -*-
+# Amara, universalsubtitles.org
+#
+# Copyright (C) 2012 Participatory Culture Foundation
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see
+# http://www.gnu.org/licenses/agpl-3.0.html.
+
+
+from django.contrib import admin
+from apps.subtitles.models import (get_lineage, Collaborator, SubtitleLanguage,
+ SubtitleVersion)
+
+
+
+class SubtitleLanguageAdmin(admin.ModelAdmin):
+ list_display = ['video_title', 'language_code', 'version_count', 'tip',
+ 'unofficial_signoffs',
+ 'official_signoffs',
+ 'pending_collaborators',
+ 'expired_pending_collaborators',
+ 'unexpired_pending_collaborators']
+ list_filter = ['created', 'language_code']
+ search_fields = ['video__title', 'video__video_id', 'language_code']
+ raw_id_fields = ['video']
+
+ def unofficial_signoffs(self, o):
+ return o.unofficial_signoff_count
+ unofficial_signoffs.admin_order_field = 'unofficial_signoff_count'
+
+ def official_signoffs(self, o):
+ return o.official_signoff_count
+ official_signoffs.admin_order_field = 'official_signoff_count'
+
+ def pending_collaborators(self, o):
+ return o.pending_signoff_count
+ pending_collaborators.short_description = 'pending'
+ pending_collaborators.admin_order_field = 'pending_signoff_count'
+
+ def expired_pending_collaborators(self, o):
+ return o.pending_signoff_expired_count
+ expired_pending_collaborators.short_description = 'expired pending'
+ expired_pending_collaborators.admin_order_field = 'pending_signoff_expired_count'
+
+ def unexpired_pending_collaborators(self, o):
+ return o.pending_signoff_unexpired_count
+ unexpired_pending_collaborators.short_description = 'unexpired pending'
+ unexpired_pending_collaborators.admin_order_field = 'pending_signoff_unexpired_count'
+
+ def video_title(self, sl):
+ return sl.video.title_display()
+ video_title.short_description = 'video'
+
+ def version_count(self, sl):
+ return sl.subtitleversion_set.count()
+ version_count.short_description = 'number of versions'
+
+ def tip(self, sl):
+ ver = sl.get_tip()
+ return ver.version_number if ver else None
+ tip.short_description = 'tip version'
+
+
+class SubtitleVersionAdmin(admin.ModelAdmin):
+ list_display = ['video_title', 'id', 'language', 'version_num',
+ 'visibility', 'visibility_override', 'parent_ids',
+ 'created']
+ raw_id_fields = ['video', 'subtitle_language', 'parents', 'author']
+ list_filter = ['created', 'visibility', 'visibility_override',
+ 'language_code']
+ search_fields = ['video__video_id', 'video__title', 'title',
+ 'language_code', 'description', 'note']
+
+ def version_num(self, sv):
+ return '#' + str(sv.version_number)
+ version_num.short_description = 'version #'
+
+ def video_title(self, sv):
+ return sv.video.title_display()
+ video_title.short_description = 'video'
+
+ def language(self, sv):
+ return sv.subtitle_language.get_language_code_display()
+
+ def parent_ids(self, sv):
+ pids = map(str, sv.parents.values_list('id', flat=True))
+ return ', '.join(pids) if pids else None
+
+ # Hack to generate lineages properly when modifying versions in the admin
+ # interface. Maybe we should just disallow this entirely once the version
+ # models are hooked up everywhere else?
+ def response_change(self, request, obj):
+ response = super(SubtitleVersionAdmin, self).response_change(request, obj)
+ obj.lineage = get_lineage(obj.parents.all())
+ obj.save()
+ return response
+
+ def response_add(self, request, obj, *args, **kwargs):
+ response = super(SubtitleVersionAdmin, self).response_add(request, obj)
+ obj.lineage = get_lineage(obj.parents.all())
+ obj.save()
+ return response
+
+
+class CollaboratorAdmin(admin.ModelAdmin):
+ list_display = ['display_video', 'display_language', 'user', 'signoff',
+ 'signoff_is_official', 'expired', 'expiration_start']
+ raw_id_fields = ['subtitle_language', 'user']
+ list_filter = ['signoff', 'signoff_is_official', 'expired', 'created']
+ search_fields = ['subtitle_language__video__video_id',
+ 'subtitle_language__video__title',
+ 'subtitle_language__language_code',
+ 'user__username', 'user__email']
+
+ def display_video(self, o):
+ return o.subtitle_language.video.title_display()
+ display_video.short_description = 'video'
+ display_video.admin_order_field = 'subtitle_language__video'
+
+ def display_language(self, o):
+ return o.subtitle_language.get_language_code_display()
+ display_language.short_description = 'language'
+ display_language.admin_order_field = 'subtitle_language__language_code'
+
+
+# -----------------------------------------------------------------------------
+admin.site.register(SubtitleLanguage, SubtitleLanguageAdmin)
+admin.site.register(SubtitleVersion, SubtitleVersionAdmin)
+admin.site.register(Collaborator, CollaboratorAdmin)
View
75 apps/subtitles/compat.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+# Amara, universalsubtitles.org
+#
+# Copyright (C) 2012 Participatory Culture Foundation
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along
+# with this program. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
+
+"""Backwards-compatibility functionality for the subtitles data model refector.
+
+These functions are isolated into this file to make them easier to track down
+and remove in the future, once we do away with the frontend features that
+require them.
+
+"""
+
+def subtitlelanguage_is_translation(sl):
+ """Return whether this SubtitleLanguage is a "translation" of another.
+
+ The concept of a one-to-one translation no longer exists in the data model,
+ but we can fake it easily enough by looking at the lineage of the tip
+ revision.
+
+ """
+ tip = sl.get_tip()
+
+ if not tip:
+ return False
+
+ lc = sl.language_code
+ ancestor_languages = set(tip.lineage.keys()) - set([lc])
+
+ return True if ancestor_languages else False
+
+def subtitlelanguage_original_language_code(sl):
+ """Return the "original_language_code" for this SubtitleLanguage.
+
+ In a nutshell, it will tell you what this SL is a "translation" of, even
+ though that concept no longer exists in the data model.
+
+ It's not perfect. In particular, a translation of a translation may return
+ the first language instead of the second. For example, consider the
+ following:
+
+ en -> fr -> de
+
+ French is a translation of English, and German is a translation of French.
+ If you call this function on the German SL, it may return either English or
+ French. It may not even be consistent across calls.
+
+ We can fix this if necessary, but it will be a lot more database intensive
+ to do so.
+
+ TODO: Determine if this edge case is worth fixing.
+
+ """
+ tip = sl.get_tip()
+
+ if not tip:
+ return None
+
+ lc = sl.language_code
+ ancestor_languages = set(tip.lineage.keys()) - set([lc])
+
+ return list(ancestor_languages)[0] if ancestor_languages else None
View
314 apps/subtitles/migrations/0001_initial.py
@@ -0,0 +1,314 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'SubtitleLanguage'
+ db.create_table('subtitles_subtitlelanguage', (
+ ('writelock_owner', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='writelocked_newlanguages', null=True, to=orm['auth.CustomUser'])),
+ ('created', self.gf('django.db.models.fields.DateTimeField')()),
+ ('writelock_session_key', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+ ('writelock_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('video', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsubtitlelanguage_set', to=orm['videos.Video'])),
+ ('language_code', self.gf('django.db.models.fields.CharField')(max_length=16)),
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ))
+ db.send_create_signal('subtitles', ['SubtitleLanguage'])
+
+ # Adding unique constraint on 'SubtitleLanguage', fields ['video', 'language_code']
+ db.create_unique('subtitles_subtitlelanguage', ['video_id', 'language_code'])
+
+ # Adding M2M table for field collaborators on 'SubtitleLanguage'
+ db.create_table('subtitles_subtitlelanguage_collaborators', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('subtitlelanguage', models.ForeignKey(orm['subtitles.subtitlelanguage'], null=False)),
+ ('customuser', models.ForeignKey(orm['auth.customuser'], null=False))
+ ))
+ db.create_unique('subtitles_subtitlelanguage_collaborators', ['subtitlelanguage_id', 'customuser_id'])
+
+ # Adding M2M table for field followers on 'SubtitleLanguage'
+ db.create_table('subtitles_subtitlelanguage_followers', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('subtitlelanguage', models.ForeignKey(orm['subtitles.subtitlelanguage'], null=False)),
+ ('customuser', models.ForeignKey(orm['auth.customuser'], null=False))
+ ))
+ db.create_unique('subtitles_subtitlelanguage_followers', ['subtitlelanguage_id', 'customuser_id'])
+
+ # Adding model 'SubtitleVersion'
+ db.create_table('subtitles_subtitleversion', (
+ ('version_number', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
+ ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
+ ('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsubtitleversion_set', to=orm['auth.CustomUser'])),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=2048, blank=True)),
+ ('serialized_lineage', self.gf('django.db.models.fields.TextField')(blank=True)),
+ ('visibility', self.gf('django.db.models.fields.CharField')(default='public', max_length=10)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')()),
+ ('serialized_subtitles', self.gf('django.db.models.fields.TextField')(blank=True)),
+ ('video', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['videos.Video'])),
+ ('language_code', self.gf('django.db.models.fields.CharField')(max_length=16)),
+ ('subtitle_language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['subtitles.SubtitleLanguage'])),
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ))
+ db.send_create_signal('subtitles', ['SubtitleVersion'])
+
+ # Adding unique constraint on 'SubtitleVersion', fields ['video', 'language_code', 'version_number']
+ db.create_unique('subtitles_subtitleversion', ['video_id', 'language_code', 'version_number'])
+
+ # Adding M2M table for field parents on 'SubtitleVersion'
+ db.create_table('subtitles_subtitleversion_parents', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('from_subtitleversion', models.ForeignKey(orm['subtitles.subtitleversion'], null=False)),
+ ('to_subtitleversion', models.ForeignKey(orm['subtitles.subtitleversion'], null=False))
+ ))
+ db.create_unique('subtitles_subtitleversion_parents', ['from_subtitleversion_id', 'to_subtitleversion_id'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'SubtitleLanguage'
+ db.delete_table('subtitles_subtitlelanguage')
+
+ # Removing unique constraint on 'SubtitleLanguage', fields ['video', 'language_code']
+ db.delete_unique('subtitles_subtitlelanguage', ['video_id', 'language_code'])
+
+ # Removing M2M table for field collaborators on 'SubtitleLanguage'
+ db.delete_table('subtitles_subtitlelanguage_collaborators')
+
+ # Removing M2M table for field followers on 'SubtitleLanguage'
+ db.delete_table('subtitles_subtitlelanguage_followers')
+
+ # Deleting model 'SubtitleVersion'
+ db.delete_table('subtitles_subtitleversion')
+
+ # Removing unique constraint on 'SubtitleVersion', fields ['video', 'language_code', 'version_number']
+ db.delete_unique('subtitles_subtitleversion', ['video_id', 'language_code', 'version_number'])
+
+ # Removing M2M table for field parents on 'SubtitleVersion'
+ db.delete_table('subtitles_subtitleversion_parents')
+
+
+ models = {
+ 'accountlinker.thirdpartyaccount': {
+ 'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+ },
+ 'auth.customuser': {
+ 'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
+ 'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'partner': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
+ 'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
+ 'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': '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'),)", 'object_name': 'Permission'},
+ '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': {
+ 'Meta': {'object_name': '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'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', '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'})
+ },
+ 'subtitles.subtitlelanguage': {
+ 'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
+ 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'subtitles.subtitleversion': {
+ 'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False'}),
+ 'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'})
+ },
+ 'teams.application': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'Application'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.project': {
+ 'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
+ 'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
+ 'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
+ 'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
+ 'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.teammember': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.teamvideo': {
+ 'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
+ },
+ 'videos.subtitlelanguage': {
+ 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
+ 'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ },
+ 'videos.video': {
+ 'Meta': {'object_name': 'Video'},
+ 'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
+ 's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['subtitles']
View
272 apps/subtitles/migrations/0002_auto__add_collaborator.py
@@ -0,0 +1,272 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'Collaborator'
+ db.create_table('subtitles_collaborator', (
+ ('signoff', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')()),
+ ('subtitle_language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['subtitles.SubtitleLanguage'])),
+ ('signoff_is_official', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
+ ('expiration_start', self.gf('django.db.models.fields.DateTimeField')()),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.CustomUser'])),
+ ('expired', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ))
+ db.send_create_signal('subtitles', ['Collaborator'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'Collaborator'
+ db.delete_table('subtitles_collaborator')
+
+
+ models = {
+ 'accountlinker.thirdpartyaccount': {
+ 'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+ },
+ 'auth.customuser': {
+ 'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
+ 'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
+ 'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
+ 'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': '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'),)", 'object_name': 'Permission'},
+ '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': {
+ 'Meta': {'object_name': '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'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', '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'})
+ },
+ 'subtitles.collaborator': {
+ 'Meta': {'unique_together': "(('user', 'subtitle_language'),)", 'object_name': 'Collaborator'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expiration_start': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'signoff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'signoff_is_official': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
+ },
+ 'subtitles.subtitlelanguage': {
+ 'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
+ 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'subtitles.subtitleversion': {
+ 'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'})
+ },
+ 'teams.application': {
+ 'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
+ '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', [], {'null': 'True', 'blank': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.partner': {
+ 'Meta': {'object_name': 'Partner'},
+ 'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
+ },
+ 'teams.project': {
+ 'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
+ 'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
+ 'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
+ 'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
+ 'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
+ 'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.teammember': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.teamvideo': {
+ 'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
+ },
+ 'videos.subtitlelanguage': {
+ 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
+ 'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ },
+ 'videos.video': {
+ 'Meta': {'object_name': 'Video'},
+ 'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
+ 's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['subtitles']
View
263 apps/subtitles/migrations/0003_auto__add_field_subtitleversion_visibility_override.py
@@ -0,0 +1,263 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding field 'SubtitleVersion.visibility_override'
+ db.add_column('subtitles_subtitleversion', 'visibility_override', self.gf('django.db.models.fields.CharField')(default='', max_length=10, blank=True), keep_default=False)
+
+
+ def backwards(self, orm):
+
+ # Deleting field 'SubtitleVersion.visibility_override'
+ db.delete_column('subtitles_subtitleversion', 'visibility_override')
+
+
+ models = {
+ 'accountlinker.thirdpartyaccount': {
+ 'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+ },
+ 'auth.customuser': {
+ 'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
+ 'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
+ 'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
+ 'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': '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'),)", 'object_name': 'Permission'},
+ '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': {
+ 'Meta': {'object_name': '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'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', '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'})
+ },
+ 'subtitles.collaborator': {
+ 'Meta': {'unique_together': "(('user', 'subtitle_language'),)", 'object_name': 'Collaborator'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expiration_start': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'signoff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'signoff_is_official': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
+ },
+ 'subtitles.subtitlelanguage': {
+ 'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
+ 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'subtitles.subtitleversion': {
+ 'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'}),
+ 'visibility_override': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'})
+ },
+ 'teams.application': {
+ 'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
+ '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', [], {'null': 'True', 'blank': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.partner': {
+ 'Meta': {'object_name': 'Partner'},
+ 'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
+ },
+ 'teams.project': {
+ 'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
+ 'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
+ 'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
+ 'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
+ 'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
+ 'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.teammember': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.teamvideo': {
+ 'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
+ },
+ 'videos.subtitlelanguage': {
+ 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
+ 'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ },
+ 'videos.video': {
+ 'Meta': {'object_name': 'Video'},
+ 'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
+ 's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['subtitles']
View
292 ...migrations/0004_auto__add_field_subtitlelanguage_official_signoff_count__add_field_sub.py
@@ -0,0 +1,292 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding field 'SubtitleLanguage.official_signoff_count'
+ db.add_column('subtitles_subtitlelanguage', 'official_signoff_count', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
+
+ # Adding field 'SubtitleLanguage.unofficial_signoff_count'
+ db.add_column('subtitles_subtitlelanguage', 'unofficial_signoff_count', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
+
+ # Adding field 'SubtitleLanguage.pending_signoff_expired_count'
+ db.add_column('subtitles_subtitlelanguage', 'pending_signoff_expired_count', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
+
+ # Adding field 'SubtitleLanguage.pending_signoff_count'
+ db.add_column('subtitles_subtitlelanguage', 'pending_signoff_count', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
+
+ # Adding field 'SubtitleLanguage.pending_signoff_unexpired_count'
+ db.add_column('subtitles_subtitlelanguage', 'pending_signoff_unexpired_count', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
+
+
+ def backwards(self, orm):
+
+ # Deleting field 'SubtitleLanguage.official_signoff_count'
+ db.delete_column('subtitles_subtitlelanguage', 'official_signoff_count')
+
+ # Deleting field 'SubtitleLanguage.unofficial_signoff_count'
+ db.delete_column('subtitles_subtitlelanguage', 'unofficial_signoff_count')
+
+ # Deleting field 'SubtitleLanguage.pending_signoff_expired_count'
+ db.delete_column('subtitles_subtitlelanguage', 'pending_signoff_expired_count')
+
+ # Deleting field 'SubtitleLanguage.pending_signoff_count'
+ db.delete_column('subtitles_subtitlelanguage', 'pending_signoff_count')
+
+ # Deleting field 'SubtitleLanguage.pending_signoff_unexpired_count'
+ db.delete_column('subtitles_subtitlelanguage', 'pending_signoff_unexpired_count')
+
+
+ models = {
+ 'accountlinker.thirdpartyaccount': {
+ 'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+ },
+ 'auth.customuser': {
+ 'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
+ 'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
+ 'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
+ 'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': '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'),)", 'object_name': 'Permission'},
+ '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': {
+ 'Meta': {'object_name': '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'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', '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'})
+ },
+ 'subtitles.collaborator': {
+ 'Meta': {'unique_together': "(('user', 'subtitle_language'),)", 'object_name': 'Collaborator'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expiration_start': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'signoff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'signoff_is_official': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
+ },
+ 'subtitles.subtitlelanguage': {
+ 'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
+ 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'official_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'pending_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'pending_signoff_expired_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'pending_signoff_unexpired_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'unofficial_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'subtitles.subtitleversion': {
+ 'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'}),
+ 'visibility_override': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'})
+ },
+ 'teams.application': {
+ 'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
+ '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', [], {'null': 'True', 'blank': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.partner': {
+ 'Meta': {'object_name': 'Partner'},
+ 'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
+ },
+ 'teams.project': {
+ 'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
+ 'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
+ 'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
+ 'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
+ 'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
+ 'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.teammember': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.teamvideo': {
+ 'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
+ },
+ 'videos.subtitlelanguage': {
+ 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank'