Skip to content
This repository
Browse code

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

  • Loading branch information...
commit e9338ae11a64b41cbacb441cb69fbd85df5af6c5 2 parents 7ae2f68 + 695e659
Steve Losh authored September 10, 2012

Showing 39 changed files with 6,527 additions and 6 deletions. Show diff stats Hide diff stats

  1. 3  .gitignore
  2. 0  apps/subtitles/__init__.py
  3. 140  apps/subtitles/admin.py
  4. 75  apps/subtitles/compat.py
  5. 314  apps/subtitles/migrations/0001_initial.py
  6. 272  apps/subtitles/migrations/0002_auto__add_collaborator.py
  7. 263  apps/subtitles/migrations/0003_auto__add_field_subtitleversion_visibility_override.py
  8. 292  apps/subtitles/migrations/0004_auto__add_field_subtitlelanguage_official_signoff_count__add_field_sub.py
  9. 284  apps/subtitles/migrations/0005_auto.py
  10. 270  apps/subtitles/migrations/0006_auto__add_field_subtitleversion_note.py
  11. 0  apps/subtitles/migrations/__init__.py
  12. 716  apps/subtitles/models.py
  13. 193  apps/subtitles/pipeline.py
  14. 2  apps/subtitles/tests/__init__.py
  15. 153  apps/subtitles/tests/compat.py
  16. 1,289  apps/subtitles/tests/models.py
  17. 572  apps/subtitles/tests/pipeline.py
  18. 62  apps/subtitles/tests/utils.py
  19. 7  apps/videos/admin.py
  20. 4  apps/videos/forms.py
  21. 336  apps/videos/migrations/0145_auto__add_field_video_primary_audio_language.py
  22. 366  apps/videos/migrations/0146_fill_primary_audio_language.py
  23. 333  apps/videos/migrations/0147_rename_pal_to_palc.py
  24. 3  apps/videos/models.py
  25. 1  deploy/requirements.txt
  26. 1  docs/index.rst
  27. 13  docs/model-refactor.rst
  28. 53  docs/subtitle-storage.rst
  29. 5  graph-history.sh
  30. 1  libs/dxfpy/__init__.py
  31. 182  libs/dxfpy/dxfpy.py
  32. 1  libs/dxfpy/tests/__init__.py
  33. 83  libs/dxfpy/tests/data.py
  34. 105  libs/dxfpy/tests/serialization.py
  35. 2  optional/unisubs-integration
  36. 1  settings.py
  37. 26  utils/chunkediter.py
  38. 37  utils/compress.py
  39. 73  utils/tests.py
3  .gitignore
@@ -66,7 +66,8 @@ media/static-cache
66 66
 .ropeproject
67 67
 /tags
68 68
 /tags.bak
  69
+history.png
  70
+history.dot
69 71
 apps/webdriver_testing/Screenshots/*.png
70 72
 apps/webdriver_testing/Screenshots/nosetests.xml
71 73
 apps/webdriver_testing/Screenshots/results.html
72  
-
0  apps/subtitles/__init__.py
No changes.
140  apps/subtitles/admin.py
... ...
@@ -0,0 +1,140 @@
  1
+# -*- coding: utf-8 -*-
  2
+# Amara, universalsubtitles.org
  3
+#
  4
+# Copyright (C) 2012 Participatory Culture Foundation
  5
+#
  6
+# This program is free software: you can redistribute it and/or modify
  7
+# it under the terms of the GNU Affero General Public License as
  8
+# published by the Free Software Foundation, either version 3 of the
  9
+# License, or (at your option) any later version.
  10
+#
  11
+# This program is distributed in the hope that it will be useful,
  12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
  13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14
+# GNU Affero General Public License for more details.
  15
+#
  16
+# You should have received a copy of the GNU Affero General Public License
  17
+# along with this program.  If not, see
  18
+# http://www.gnu.org/licenses/agpl-3.0.html.
  19
+
  20
+
  21
+from django.contrib import admin
  22
+from apps.subtitles.models import (get_lineage, Collaborator, SubtitleLanguage,
  23
+                                   SubtitleVersion)
  24
+
  25
+
  26
+
  27
+class SubtitleLanguageAdmin(admin.ModelAdmin):
  28
+    list_display = ['video_title', 'language_code', 'version_count', 'tip',
  29
+                    'unofficial_signoffs',
  30
+                    'official_signoffs',
  31
+                    'pending_collaborators',
  32
+                    'expired_pending_collaborators',
  33
+                    'unexpired_pending_collaborators']
  34
+    list_filter = ['created', 'language_code']
  35
+    search_fields = ['video__title', 'video__video_id', 'language_code']
  36
+    raw_id_fields = ['video']
  37
+
  38
+    def unofficial_signoffs(self, o):
  39
+        return o.unofficial_signoff_count
  40
+    unofficial_signoffs.admin_order_field = 'unofficial_signoff_count'
  41
+
  42
+    def official_signoffs(self, o):
  43
+        return o.official_signoff_count
  44
+    official_signoffs.admin_order_field = 'official_signoff_count'
  45
+
  46
+    def pending_collaborators(self, o):
  47
+        return o.pending_signoff_count
  48
+    pending_collaborators.short_description = 'pending'
  49
+    pending_collaborators.admin_order_field = 'pending_signoff_count'
  50
+
  51
+    def expired_pending_collaborators(self, o):
  52
+        return o.pending_signoff_expired_count
  53
+    expired_pending_collaborators.short_description = 'expired pending'
  54
+    expired_pending_collaborators.admin_order_field = 'pending_signoff_expired_count'
  55
+
  56
+    def unexpired_pending_collaborators(self, o):
  57
+        return o.pending_signoff_unexpired_count
  58
+    unexpired_pending_collaborators.short_description = 'unexpired pending'
  59
+    unexpired_pending_collaborators.admin_order_field = 'pending_signoff_unexpired_count'
  60
+
  61
+    def video_title(self, sl):
  62
+        return sl.video.title_display()
  63
+    video_title.short_description = 'video'
  64
+
  65
+    def version_count(self, sl):
  66
+        return sl.subtitleversion_set.count()
  67
+    version_count.short_description = 'number of versions'
  68
+
  69
+    def tip(self, sl):
  70
+        ver = sl.get_tip()
  71
+        return ver.version_number if ver else None
  72
+    tip.short_description = 'tip version'
  73
+
  74
+
  75
+class SubtitleVersionAdmin(admin.ModelAdmin):
  76
+    list_display = ['video_title', 'id', 'language', 'version_num',
  77
+                    'visibility', 'visibility_override', 'parent_ids',
  78
+                    'created']
  79
+    raw_id_fields = ['video', 'subtitle_language', 'parents', 'author']
  80
+    list_filter = ['created', 'visibility', 'visibility_override',
  81
+                   'language_code']
  82
+    search_fields = ['video__video_id', 'video__title', 'title',
  83
+                     'language_code', 'description', 'note']
  84
+
  85
+    def version_num(self, sv):
  86
+        return '#' + str(sv.version_number)
  87
+    version_num.short_description = 'version #'
  88
+
  89
+    def video_title(self, sv):
  90
+        return sv.video.title_display()
  91
+    video_title.short_description = 'video'
  92
+
  93
+    def language(self, sv):
  94
+        return sv.subtitle_language.get_language_code_display()
  95
+
  96
+    def parent_ids(self, sv):
  97
+        pids = map(str, sv.parents.values_list('id', flat=True))
  98
+        return ', '.join(pids) if pids else None
  99
+
  100
+    # Hack to generate lineages properly when modifying versions in the admin
  101
+    # interface.  Maybe we should just disallow this entirely once the version
  102
+    # models are hooked up everywhere else?
  103
+    def response_change(self, request, obj):
  104
+        response = super(SubtitleVersionAdmin, self).response_change(request, obj)
  105
+        obj.lineage = get_lineage(obj.parents.all())
  106
+        obj.save()
  107
+        return response
  108
+
  109
+    def response_add(self, request, obj, *args, **kwargs):
  110
+        response = super(SubtitleVersionAdmin, self).response_add(request, obj)
  111
+        obj.lineage = get_lineage(obj.parents.all())
  112
+        obj.save()
  113
+        return response
  114
+
  115
+
  116
+class CollaboratorAdmin(admin.ModelAdmin):
  117
+    list_display = ['display_video', 'display_language', 'user', 'signoff',
  118
+                    'signoff_is_official', 'expired', 'expiration_start']
  119
+    raw_id_fields = ['subtitle_language', 'user']
  120
+    list_filter = ['signoff', 'signoff_is_official', 'expired', 'created']
  121
+    search_fields = ['subtitle_language__video__video_id',
  122
+                     'subtitle_language__video__title',
  123
+                     'subtitle_language__language_code',
  124
+                     'user__username', 'user__email']
  125
+
  126
+    def display_video(self, o):
  127
+        return o.subtitle_language.video.title_display()
  128
+    display_video.short_description = 'video'
  129
+    display_video.admin_order_field = 'subtitle_language__video'
  130
+
  131
+    def display_language(self, o):
  132
+        return o.subtitle_language.get_language_code_display()
  133
+    display_language.short_description = 'language'
  134
+    display_language.admin_order_field = 'subtitle_language__language_code'
  135
+
  136
+
  137
+# -----------------------------------------------------------------------------
  138
+admin.site.register(SubtitleLanguage, SubtitleLanguageAdmin)
  139
+admin.site.register(SubtitleVersion, SubtitleVersionAdmin)
  140
+admin.site.register(Collaborator, CollaboratorAdmin)
75  apps/subtitles/compat.py
... ...
@@ -0,0 +1,75 @@
  1
+# -*- coding: utf-8 -*-
  2
+# Amara, universalsubtitles.org
  3
+#
  4
+# Copyright (C) 2012 Participatory Culture Foundation
  5
+#
  6
+# This program is free software: you can redistribute it and/or modify it under
  7
+# the terms of the GNU Affero General Public License as published by the Free
  8
+# Software Foundation, either version 3 of the License, or (at your option) any
  9
+# later version.
  10
+#
  11
+# This program is distributed in the hope that it will be useful, but WITHOUT
  12
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13
+# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
  14
+# details.
  15
+#
  16
+# You should have received a copy of the GNU Affero General Public License along
  17
+# with this program.  If not, see http://www.gnu.org/licenses/agpl-3.0.html.
  18
+
  19
+"""Backwards-compatibility functionality for the subtitles data model refector.
  20
+
  21
+These functions are isolated into this file to make them easier to track down
  22
+and remove in the future, once we do away with the frontend features that
  23
+require them.
  24
+
  25
+"""
  26
+
  27
+def subtitlelanguage_is_translation(sl):
  28
+    """Return whether this SubtitleLanguage is a "translation" of another.
  29
+
  30
+    The concept of a one-to-one translation no longer exists in the data model,
  31
+    but we can fake it easily enough by looking at the lineage of the tip
  32
+    revision.
  33
+
  34
+    """
  35
+    tip = sl.get_tip()
  36
+
  37
+    if not tip:
  38
+        return False
  39
+
  40
+    lc = sl.language_code
  41
+    ancestor_languages = set(tip.lineage.keys()) - set([lc])
  42
+
  43
+    return True if ancestor_languages else False
  44
+
  45
+def subtitlelanguage_original_language_code(sl):
  46
+    """Return the "original_language_code" for this SubtitleLanguage.
  47
+
  48
+    In a nutshell, it will tell you what this SL is a "translation" of, even
  49
+    though that concept no longer exists in the data model.
  50
+
  51
+    It's not perfect.  In particular, a translation of a translation may return
  52
+    the first language instead of the second.  For example, consider the
  53
+    following:
  54
+
  55
+        en -> fr -> de
  56
+
  57
+    French is a translation of English, and German is a translation of French.
  58
+    If you call this function on the German SL, it may return either English or
  59
+    French.  It may not even be consistent across calls.
  60
+
  61
+    We can fix this if necessary, but it will be a lot more database intensive
  62
+    to do so.
  63
+
  64
+    TODO: Determine if this edge case is worth fixing.
  65
+
  66
+    """
  67
+    tip = sl.get_tip()
  68
+
  69
+    if not tip:
  70
+        return None
  71
+
  72
+    lc = sl.language_code
  73
+    ancestor_languages = set(tip.lineage.keys()) - set([lc])
  74
+
  75
+    return list(ancestor_languages)[0] if ancestor_languages else None
314  apps/subtitles/migrations/0001_initial.py
... ...
@@ -0,0 +1,314 @@
  1
+# encoding: utf-8
  2
+import datetime
  3
+from south.db import db
  4
+from south.v2 import SchemaMigration
  5
+from django.db import models
  6
+
  7
+class Migration(SchemaMigration):
  8
+    
  9
+    def forwards(self, orm):
  10
+        
  11
+        # Adding model 'SubtitleLanguage'
  12
+        db.create_table('subtitles_subtitlelanguage', (
  13
+            ('writelock_owner', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='writelocked_newlanguages', null=True, to=orm['auth.CustomUser'])),
  14
+            ('created', self.gf('django.db.models.fields.DateTimeField')()),
  15
+            ('writelock_session_key', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
  16
+            ('writelock_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
  17
+            ('video', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsubtitlelanguage_set', to=orm['videos.Video'])),
  18
+            ('language_code', self.gf('django.db.models.fields.CharField')(max_length=16)),
  19
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  20
+        ))
  21
+        db.send_create_signal('subtitles', ['SubtitleLanguage'])
  22
+
  23
+        # Adding unique constraint on 'SubtitleLanguage', fields ['video', 'language_code']
  24
+        db.create_unique('subtitles_subtitlelanguage', ['video_id', 'language_code'])
  25
+
  26
+        # Adding M2M table for field collaborators on 'SubtitleLanguage'
  27
+        db.create_table('subtitles_subtitlelanguage_collaborators', (
  28
+            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
  29
+            ('subtitlelanguage', models.ForeignKey(orm['subtitles.subtitlelanguage'], null=False)),
  30
+            ('customuser', models.ForeignKey(orm['auth.customuser'], null=False))
  31
+        ))
  32
+        db.create_unique('subtitles_subtitlelanguage_collaborators', ['subtitlelanguage_id', 'customuser_id'])
  33
+
  34
+        # Adding M2M table for field followers on 'SubtitleLanguage'
  35
+        db.create_table('subtitles_subtitlelanguage_followers', (
  36
+            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
  37
+            ('subtitlelanguage', models.ForeignKey(orm['subtitles.subtitlelanguage'], null=False)),
  38
+            ('customuser', models.ForeignKey(orm['auth.customuser'], null=False))
  39
+        ))
  40
+        db.create_unique('subtitles_subtitlelanguage_followers', ['subtitlelanguage_id', 'customuser_id'])
  41
+
  42
+        # Adding model 'SubtitleVersion'
  43
+        db.create_table('subtitles_subtitleversion', (
  44
+            ('version_number', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
  45
+            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
  46
+            ('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsubtitleversion_set', to=orm['auth.CustomUser'])),
  47
+            ('title', self.gf('django.db.models.fields.CharField')(max_length=2048, blank=True)),
  48
+            ('serialized_lineage', self.gf('django.db.models.fields.TextField')(blank=True)),
  49
+            ('visibility', self.gf('django.db.models.fields.CharField')(default='public', max_length=10)),
  50
+            ('created', self.gf('django.db.models.fields.DateTimeField')()),
  51
+            ('serialized_subtitles', self.gf('django.db.models.fields.TextField')(blank=True)),
  52
+            ('video', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['videos.Video'])),
  53
+            ('language_code', self.gf('django.db.models.fields.CharField')(max_length=16)),
  54
+            ('subtitle_language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['subtitles.SubtitleLanguage'])),
  55
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  56
+        ))
  57
+        db.send_create_signal('subtitles', ['SubtitleVersion'])
  58
+
  59
+        # Adding unique constraint on 'SubtitleVersion', fields ['video', 'language_code', 'version_number']
  60
+        db.create_unique('subtitles_subtitleversion', ['video_id', 'language_code', 'version_number'])
  61
+
  62
+        # Adding M2M table for field parents on 'SubtitleVersion'
  63
+        db.create_table('subtitles_subtitleversion_parents', (
  64
+            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
  65
+            ('from_subtitleversion', models.ForeignKey(orm['subtitles.subtitleversion'], null=False)),
  66
+            ('to_subtitleversion', models.ForeignKey(orm['subtitles.subtitleversion'], null=False))
  67
+        ))
  68
+        db.create_unique('subtitles_subtitleversion_parents', ['from_subtitleversion_id', 'to_subtitleversion_id'])
  69
+    
  70
+    
  71
+    def backwards(self, orm):
  72
+        
  73
+        # Deleting model 'SubtitleLanguage'
  74
+        db.delete_table('subtitles_subtitlelanguage')
  75
+
  76
+        # Removing unique constraint on 'SubtitleLanguage', fields ['video', 'language_code']
  77
+        db.delete_unique('subtitles_subtitlelanguage', ['video_id', 'language_code'])
  78
+
  79
+        # Removing M2M table for field collaborators on 'SubtitleLanguage'
  80
+        db.delete_table('subtitles_subtitlelanguage_collaborators')
  81
+
  82
+        # Removing M2M table for field followers on 'SubtitleLanguage'
  83
+        db.delete_table('subtitles_subtitlelanguage_followers')
  84
+
  85
+        # Deleting model 'SubtitleVersion'
  86
+        db.delete_table('subtitles_subtitleversion')
  87
+
  88
+        # Removing unique constraint on 'SubtitleVersion', fields ['video', 'language_code', 'version_number']
  89
+        db.delete_unique('subtitles_subtitleversion', ['video_id', 'language_code', 'version_number'])
  90
+
  91
+        # Removing M2M table for field parents on 'SubtitleVersion'
  92
+        db.delete_table('subtitles_subtitleversion_parents')
  93
+    
  94
+    
  95
+    models = {
  96
+        'accountlinker.thirdpartyaccount': {
  97
+            'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
  98
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  99
+            'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  100
+            'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  101
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
  102
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
  103
+        },
  104
+        'auth.customuser': {
  105
+            'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
  106
+            'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  107
+            'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  108
+            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  109
+            'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  110
+            'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  111
+            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  112
+            'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  113
+            'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
  114
+            'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  115
+            'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  116
+            'partner': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
  117
+            'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
  118
+            'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  119
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
  120
+            'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  121
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
  122
+        },
  123
+        'auth.group': {
  124
+            'Meta': {'object_name': 'Group'},
  125
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  126
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  127
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  128
+        },
  129
+        'auth.permission': {
  130
+            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  131
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  132
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  133
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  134
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  135
+        },
  136
+        'auth.user': {
  137
+            'Meta': {'object_name': 'User'},
  138
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  139
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  140
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  141
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  142
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  143
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  144
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  145
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  146
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  147
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  148
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  149
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  150
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  151
+        },
  152
+        'contenttypes.contenttype': {
  153
+            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  154
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  155
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  156
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  157
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  158
+        },
  159
+        'subtitles.subtitlelanguage': {
  160
+            'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
  161
+            'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  162
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  163
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  164
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  165
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  166
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
  167
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  168
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  169
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
  170
+        },
  171
+        'subtitles.subtitleversion': {
  172
+            'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
  173
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
  174
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  175
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  176
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  177
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  178
+            'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False'}),
  179
+            'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  180
+            'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  181
+            'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
  182
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  183
+            'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  184
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  185
+            'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'})
  186
+        },
  187
+        'teams.application': {
  188
+            'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'Application'},
  189
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  190
+            'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  191
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
  192
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
  193
+        },
  194
+        'teams.project': {
  195
+            'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
  196
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  197
+            'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  198
+            'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  199
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  200
+            'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
  201
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  202
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  203
+            'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
  204
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  205
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  206
+        },
  207
+        'teams.team': {
  208
+            'Meta': {'object_name': 'Team'},
  209
+            'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
  210
+            'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  211
+            'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
  212
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  213
+            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  214
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  215
+            'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  216
+            'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  217
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  218
+            'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  219
+            'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  220
+            'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  221
+            'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
  222
+            'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  223
+            'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
  224
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  225
+            'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  226
+            'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  227
+            'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  228
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  229
+            'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  230
+            'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  231
+            'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  232
+            'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
  233
+            'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  234
+            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
  235
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
  236
+            'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  237
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
  238
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  239
+        },
  240
+        'teams.teammember': {
  241
+            'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
  242
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  243
+            'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
  244
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
  245
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
  246
+        },
  247
+        'teams.teamvideo': {
  248
+            'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
  249
+            'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
  250
+            'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  251
+            'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
  252
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  253
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  254
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  255
+            'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
  256
+            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
  257
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  258
+            'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  259
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  260
+            'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
  261
+        },
  262
+        'videos.subtitlelanguage': {
  263
+            'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
  264
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  265
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  266
+            'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  267
+            'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  268
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  269
+            'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  270
+            'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  271
+            'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  272
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  273
+            'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  274
+            'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
  275
+            'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  276
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  277
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  278
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  279
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  280
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  281
+        },
  282
+        'videos.video': {
  283
+            'Meta': {'object_name': 'Video'},
  284
+            'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  285
+            'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  286
+            'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  287
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  288
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  289
+            'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
  290
+            'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
  291
+            'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  292
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  293
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  294
+            'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  295
+            'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  296
+            'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  297
+            'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
  298
+            's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  299
+            'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  300
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  301
+            'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  302
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  303
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  304
+            'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
  305
+            'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  306
+            'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  307
+            'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  308
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  309
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  310
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  311
+        }
  312
+    }
  313
+    
  314
+    complete_apps = ['subtitles']
272  apps/subtitles/migrations/0002_auto__add_collaborator.py
... ...
@@ -0,0 +1,272 @@
  1
+# encoding: utf-8
  2
+import datetime
  3
+from south.db import db
  4
+from south.v2 import SchemaMigration
  5
+from django.db import models
  6
+
  7
+class Migration(SchemaMigration):
  8
+    
  9
+    def forwards(self, orm):
  10
+        
  11
+        # Adding model 'Collaborator'
  12
+        db.create_table('subtitles_collaborator', (
  13
+            ('signoff', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
  14
+            ('created', self.gf('django.db.models.fields.DateTimeField')()),
  15
+            ('subtitle_language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['subtitles.SubtitleLanguage'])),
  16
+            ('signoff_is_official', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
  17
+            ('expiration_start', self.gf('django.db.models.fields.DateTimeField')()),
  18
+            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.CustomUser'])),
  19
+            ('expired', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
  20
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  21
+        ))
  22
+        db.send_create_signal('subtitles', ['Collaborator'])
  23
+    
  24
+    
  25
+    def backwards(self, orm):
  26
+        
  27
+        # Deleting model 'Collaborator'
  28
+        db.delete_table('subtitles_collaborator')
  29
+    
  30
+    
  31
+    models = {
  32
+        'accountlinker.thirdpartyaccount': {
  33
+            'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
  34
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  35
+            'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  36
+            'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  37
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
  38
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
  39
+        },
  40
+        'auth.customuser': {
  41
+            'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
  42
+            'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  43
+            'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  44
+            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  45
+            'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  46
+            'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  47
+            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  48
+            'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  49
+            'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
  50
+            'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  51
+            'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  52
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
  53
+            'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
  54
+            'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  55
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
  56
+            'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  57
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
  58
+        },
  59
+        'auth.group': {
  60
+            'Meta': {'object_name': 'Group'},
  61
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  62
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  63
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  64
+        },
  65
+        'auth.permission': {
  66
+            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  67
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  68
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  69
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  70
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  71
+        },
  72
+        'auth.user': {
  73
+            'Meta': {'object_name': 'User'},
  74
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  75
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  76
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  77
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  78
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  79
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  80
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  81
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  82
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  83
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  84
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  85
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  86
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  87
+        },
  88
+        'contenttypes.contenttype': {
  89
+            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  90
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  91
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  92
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  93
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  94
+        },
  95
+        'subtitles.collaborator': {
  96
+            'Meta': {'unique_together': "(('user', 'subtitle_language'),)", 'object_name': 'Collaborator'},
  97
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  98
+            'expiration_start': ('django.db.models.fields.DateTimeField', [], {}),
  99
+            'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  100
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  101
+            'signoff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  102
+            'signoff_is_official': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  103
+            'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
  104
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  105
+        },
  106
+        'subtitles.subtitlelanguage': {
  107
+            'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
  108
+            'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  109
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  110
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  111
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  112
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  113
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
  114
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  115
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  116
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
  117
+        },
  118
+        'subtitles.subtitleversion': {
  119
+            'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
  120
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
  121
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  122
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  123
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  124
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  125
+            'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
  126
+            'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  127
+            'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  128
+            'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
  129
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  130
+            'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
  131
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  132
+            'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'})
  133
+        },
  134
+        'teams.application': {
  135
+            'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
  136
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  137
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  138
+            'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  139
+            'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  140
+            'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  141
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
  142
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
  143
+        },
  144
+        'teams.partner': {
  145
+            'Meta': {'object_name': 'Partner'},
  146
+            'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  147
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  148
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  149
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  150
+        },
  151
+        'teams.project': {
  152
+            'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
  153
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  154
+            'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  155
+            'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  156
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  157
+            'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
  158
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  159
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  160
+            'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
  161
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  162
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  163
+        },
  164
+        'teams.team': {
  165
+            'Meta': {'object_name': 'Team'},
  166
+            'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
  167
+            'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  168
+            'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
  169
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  170
+            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  171
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  172
+            'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  173
+            'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  174
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  175
+            'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  176
+            'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  177
+            'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  178
+            'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
  179
+            'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  180
+            'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
  181
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  182
+            'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  183
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
  184
+            'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  185
+            'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  186
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  187
+            'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  188
+            'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  189
+            'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  190
+            'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
  191
+            'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  192
+            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
  193
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
  194
+            'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  195
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
  196
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  197
+        },
  198
+        'teams.teammember': {
  199
+            'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
  200
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  201
+            'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
  202
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
  203
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
  204
+        },
  205
+        'teams.teamvideo': {
  206
+            'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
  207
+            'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
  208
+            'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  209
+            'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
  210
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  211
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  212
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  213
+            'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
  214
+            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
  215
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  216
+            'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  217
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  218
+            'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
  219
+        },
  220
+        'videos.subtitlelanguage': {
  221
+            'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
  222
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  223
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  224
+            'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  225
+            'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  226
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  227
+            'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  228
+            'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  229
+            'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  230
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  231
+            'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  232
+            'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
  233
+            'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  234
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  235
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  236
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  237
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  238
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  239
+        },
  240
+        'videos.video': {
  241
+            'Meta': {'object_name': 'Video'},
  242
+            'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  243
+            'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  244
+            'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  245
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  246
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  247
+            'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
  248
+            'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
  249
+            'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  250
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  251
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  252
+            'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  253
+            'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  254
+            'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  255
+            'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
  256
+            's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  257
+            'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  258
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  259
+            'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  260
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  261
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  262
+            'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
  263
+            'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  264
+            'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  265
+            'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  266
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  267
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  268
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  269
+        }
  270
+    }
  271
+    
  272
+    complete_apps = ['subtitles']
263  apps/subtitles/migrations/0003_auto__add_field_subtitleversion_visibility_override.py
... ...
@@ -0,0 +1,263 @@
  1
+# encoding: utf-8
  2
+import datetime
  3
+from south.db import db
  4
+from south.v2 import SchemaMigration
  5
+from django.db import models
  6
+
  7
+class Migration(SchemaMigration):
  8
+    
  9
+    def forwards(self, orm):
  10
+        
  11
+        # Adding field 'SubtitleVersion.visibility_override'
  12
+        db.add_column('subtitles_subtitleversion', 'visibility_override', self.gf('django.db.models.fields.CharField')(default='', max_length=10, blank=True), keep_default=False)
  13
+    
  14
+    
  15
+    def backwards(self, orm):
  16
+        
  17
+        # Deleting field 'SubtitleVersion.visibility_override'
  18
+        db.delete_column('subtitles_subtitleversion', 'visibility_override')
  19
+    
  20
+    
  21
+    models = {
  22
+        'accountlinker.thirdpartyaccount': {
  23
+            'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
  24
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  25
+            'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  26
+            'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  27
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
  28
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
  29
+        },
  30
+        'auth.customuser': {
  31
+            'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
  32
+            'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  33
+            'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  34
+            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  35
+            'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  36
+            'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  37
+            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  38
+            'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  39
+            'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
  40
+            'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  41
+            'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  42
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
  43
+            'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
  44
+            'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  45
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
  46
+            'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  47
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
  48
+        },
  49
+        'auth.group': {
  50
+            'Meta': {'object_name': 'Group'},
  51
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  52
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  53
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  54
+        },
  55
+        'auth.permission': {
  56
+            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  57
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  58
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  59
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  60
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  61
+        },
  62
+        'auth.user': {
  63
+            'Meta': {'object_name': 'User'},
  64
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  65
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  66
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  67
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  68
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  69
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  70
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  71
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  72
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  73
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  74
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  75
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  76
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  77
+        },
  78
+        'contenttypes.contenttype': {
  79
+            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  80
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  81
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  82
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  83
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  84
+        },
  85
+        'subtitles.collaborator': {
  86
+            'Meta': {'unique_together': "(('user', 'subtitle_language'),)", 'object_name': 'Collaborator'},
  87
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  88
+            'expiration_start': ('django.db.models.fields.DateTimeField', [], {}),
  89
+            'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  90
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  91
+            'signoff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  92
+            'signoff_is_official': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  93
+            'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
  94
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  95
+        },
  96
+        'subtitles.subtitlelanguage': {
  97
+            'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
  98
+            'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'collab_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  99
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  100
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_newlanguages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  101
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  102
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  103
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
  104
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  105
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  106
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
  107
+        },
  108
+        'subtitles.subtitleversion': {
  109
+            'Meta': {'unique_together': "[('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
  110
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
  111
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  112
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  113
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  114
+            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  115
+            'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
  116
+            'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  117
+            'serialized_subtitles': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  118
+            'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
  119
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  120
+            'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
  121
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  122
+            'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'}),
  123
+            'visibility_override': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'})
  124
+        },
  125
+        'teams.application': {
  126
+            'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
  127
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  128
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  129
+            'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  130
+            'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  131
+            'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  132
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
  133
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
  134
+        },
  135
+        'teams.partner': {
  136
+            'Meta': {'object_name': 'Partner'},
  137
+            'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  138
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  139
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  140
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  141
+        },
  142
+        'teams.project': {
  143
+            'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
  144
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  145
+            'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  146
+            'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  147
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  148
+            'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
  149
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  150
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  151
+            'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
  152
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  153
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  154
+        },
  155
+        'teams.team': {
  156
+            'Meta': {'object_name': 'Team'},
  157
+            'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
  158
+            'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  159
+            'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
  160
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  161
+            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  162
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  163
+            'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  164
+            'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  165
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  166
+            'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  167
+            'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  168
+            'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  169
+            'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
  170
+            'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  171
+            'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
  172
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  173
+            'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  174
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),