Skip to content
This repository
Browse code

merged dev

  • Loading branch information...
commit ae4ffcd98963695d7df6cc8918396ed0817569fb 2 parents 5deddc8 + 6581c09
Evan Hazlett authored August 13, 2012

Showing 102 changed files with 8,886 additions and 5,951 deletions. Show diff stats Hide diff stats

  1. 2  .kick
  2. 21  apps/{icanhaz/urls.py → accountlinker/admin.py}
  3. 45  apps/accountlinker/migrations/0003_auto__add_youtubesyncrule.py
  4. 160  apps/accountlinker/models.py
  5. 74  apps/accountlinker/tests.py
  6. 8  apps/accountlinker/views.py
  7. 267  apps/auth/migrations/0026_auto__add_field_customuser_partner_fk.py
  8. 271  apps/auth/migrations/0027_normalize_partner.py
  9. 153  apps/{icanhaz/migrations/0001_initial.py → auth/migrations/0028_auto__del_field_customuser_partner.py}
  10. 272  apps/auth/migrations/0029_auto__del_field_customuser_partner_fk__add_field_customuser_partner.py
  11. 2  apps/auth/models.py
  12. 7  apps/auth/templatetags/announcement_tags.py
  13. 4  apps/comments/tests.py
  14. 0  apps/icanhaz/__init__.py
  15. 46  apps/icanhaz/forms.py
  16. 0  apps/icanhaz/migrations/__init__.py
  17. 252  apps/icanhaz/models.py
  18. 5  apps/icanhaz/permissions.py
  19. 3  apps/icanhaz/projects.py
  20. 53  apps/icanhaz/projects_decorators.py
  21. 554  apps/icanhaz/tests.py
  22. 67  apps/icanhaz/views.py
  23. 8  apps/localeurl/utils.py
  24. 1  apps/messages/tasks.py
  25. 12  apps/teams/admin.py
  26. 33  apps/teams/forms.py
  27. 311  apps/teams/migrations/0100_auto__add_field_invite_approved.py
  28. 311  apps/teams/migrations/0101_auto__del_unique_invite_user_team.py
  29. 328  apps/teams/migrations/0102_auto__add_billingreport.py
  30. 326  apps/teams/migrations/0103_auto__del_field_billingreport_csv_data__add_field_billingreport_csv_fi.py
  31. 331  apps/teams/migrations/0104_auto__add_partner.py
  32. 327  apps/teams/migrations/0105_auto__add_field_team_partner.py
  33. 342  apps/teams/migrations/0106_auto__add_field_application_status__add_field_application_created__add.py
  34. 336  apps/teams/migrations/0107_auto__del_unique_application_user_team__add_unique_application_status_.py
  35. 331  apps/teams/migrations/0108_auto__add_field_partner_can_request_paid_captions.py
  36. 241  apps/teams/models.py
  37. 67  apps/teams/notifications.py
  38. 9  apps/teams/rpc.py
  39. 24  apps/teams/search_indexes.py
  40. 33  apps/teams/signals.py
  41. 52  apps/teams/tasks.py
  42. 15  apps/teams/templatetags/teams_tags.py
  43. 9  apps/teams/tests/permissions.py
  44. 434  apps/teams/tests/teams.py
  45. 51  apps/teams/tests/test_views.py
  46. 150  apps/teams/views.py
  47. 58  apps/unisubs_compressor/management/commands/compile_media.py
  48. 2  apps/videos/__init__.py
  49. 7  apps/videos/admin.py
  50. 50  apps/videos/decorators.py
  51. 31  apps/videos/fixtures/sample.dfxp
  52. 272  apps/videos/forms.py
  53. 5  apps/videos/metadata_manager.py
  54. 24  apps/videos/models.py
  55. 13  apps/videos/search_indexes.py
  56. 16  apps/videos/templatetags/subtitles_tags.py
  57. 13  apps/videos/templatetags/videos_tags.py
  58. 63  apps/videos/tests.py
  59. 1  apps/videos/urls.py
  60. 33  apps/videos/views.py
  61. 74  apps/widget/rpc.py
  62. 60  apps/widget/srt_subs.py
  63. 6  apps/widget/tests.py
  64. 4  apps/widget/urls.py
  65. 45  apps/widget/video_cache.py
  66. 2  apps/widget/views.py
  67. 4  bootstrap-vagrant.sh
  68. 120  closure/compile.py
  69. 68  closure/compilelite.py
  70. 11  deploy/celery/README
  71. 23  deploy/celery/config/celeryd
  72. 23  deploy/celery/config/example
  73. 238  deploy/celery/init.d/celerybeat
  74. 233  deploy/celery/init.d/celeryd
  75. 252  deploy/celery/init.d/celeryevcam
  76. 2  deploy/fabfile.py
  77. 1  deploy/requirements.txt
  78. BIN  deploy/vendor/django-guardian-1.0.2.tar.gz
  79. BIN  deploy/vendor/django-guardian-1.0.3.tar.gz
  80. BIN  deploy/vendor/django-guardian.tar.gz
  81. BIN  deploy/vendor/django-livesettings.tar.gz
  82. 100  docs/api.rst
  83. 4  docs/conf.py
  84. 150  docs/django-1.4.rst
  85. 40  docs/youtube-pilot.rst
  86. 4  jenkins/jobs/unisubs/config.xml
  87. BIN  locale/ar/LC_MESSAGES/django.mo
  88. 916  locale/ar/LC_MESSAGES/django.po
  89. BIN  locale/ast/LC_MESSAGES/django.mo
  90. 912  locale/ast/LC_MESSAGES/django.po
  91. BIN  locale/bg/LC_MESSAGES/django.mo
  92. 912  locale/bg/LC_MESSAGES/django.po
  93. BIN  locale/bn/LC_MESSAGES/django.mo
  94. 910  locale/bn/LC_MESSAGES/django.po
  95. BIN  locale/bs/LC_MESSAGES/django.mo
  96. 913  locale/bs/LC_MESSAGES/django.po
  97. BIN  locale/ca/LC_MESSAGES/django.mo
  98. 944  locale/ca/LC_MESSAGES/django.po
  99. BIN  locale/cs/LC_MESSAGES/django.mo
  100. 930  locale/cs/LC_MESSAGES/django.po
  101. BIN  locale/cy/LC_MESSAGES/django.mo
2  .kick
... ...
@@ -1,7 +1,7 @@
1 1
 process do |files|
2 2
     files.take_and_map do |file|
3 3
         case file
4  
-        when %r{^media/js/embedder/embedder.js$}
  4
+        when %r{^media/js/embedder/embedder.js|media/js/embedder/popcorn.transcript.js$}
5 5
             execute "jshint media/js/embedder/embedder.js"
6 6
             execute "media/js/embedder/compile-embedder.sh"
7 7
         when %r{^media/css/v1.scss$}
21  apps/icanhaz/urls.py → apps/accountlinker/admin.py
... ...
@@ -1,25 +1,28 @@
1 1
 # Amara, universalsubtitles.org
2  
-# 
  2
+#
3 3
 # Copyright (C) 2012 Participatory Culture Foundation
4  
-# 
  4
+#
5 5
 # This program is free software: you can redistribute it and/or modify
6 6
 # it under the terms of the GNU Affero General Public License as
7 7
 # published by the Free Software Foundation, either version 3 of the
8 8
 # License, or (at your option) any later version.
9  
-# 
  9
+#
10 10
 # This program is distributed in the hope that it will be useful,
11 11
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 13
 # GNU Affero General Public License for more details.
14  
-# 
  14
+#
15 15
 # You should have received a copy of the GNU Affero General Public License
16  
-# along with this program.  If not, see 
  16
+# along with this program.  If not, see
17 17
 # http://www.gnu.org/licenses/agpl-3.0.html.
18 18
 
19  
-from django.conf.urls.defaults import patterns, url
  19
+from django.contrib import admin
  20
+from models import ThirdPartyAccount, YoutubeSyncRule
20 21
 
21 22
 
22  
-urlpatterns = patterns('icanhaz.views',
23  
-    url('^(?P<video_id>[\w]+)/visibility-form/show/', 'get_visibility_form', name='get-visibility-form'),
24  
-)
  23
+class ThirdPartyAccountAdmin(admin.ModelAdmin):
  24
+    list_display = ('type', 'username',)
25 25
 
  26
+
  27
+admin.site.register(ThirdPartyAccount, ThirdPartyAccountAdmin)
  28
+admin.site.register(YoutubeSyncRule)
45  apps/accountlinker/migrations/0003_auto__add_youtubesyncrule.py
... ...
@@ -0,0 +1,45 @@
  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 'YoutubeSyncRule'
  12
+        db.create_table('accountlinker_youtubesyncrule', (
  13
+            ('user', self.gf('django.db.models.fields.TextField')()),
  14
+            ('video', self.gf('django.db.models.fields.TextField')()),
  15
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  16
+            ('team', self.gf('django.db.models.fields.TextField')()),
  17
+        ))
  18
+        db.send_create_signal('accountlinker', ['YoutubeSyncRule'])
  19
+    
  20
+    
  21
+    def backwards(self, orm):
  22
+        
  23
+        # Deleting model 'YoutubeSyncRule'
  24
+        db.delete_table('accountlinker_youtubesyncrule')
  25
+    
  26
+    
  27
+    models = {
  28
+        'accountlinker.thirdpartyaccount': {
  29
+            'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
  30
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  31
+            'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  32
+            'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  33
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
  34
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
  35
+        },
  36
+        'accountlinker.youtubesyncrule': {
  37
+            'Meta': {'object_name': 'YoutubeSyncRule'},
  38
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  39
+            'team': ('django.db.models.fields.TextField', [], {}),
  40
+            'user': ('django.db.models.fields.TextField', [], {}),
  41
+            'video': ('django.db.models.fields.TextField', [], {})
  42
+        }
  43
+    }
  44
+    
  45
+    complete_apps = ['accountlinker']
160  apps/accountlinker/models.py
@@ -17,17 +17,63 @@
17 17
 # http://www.gnu.org/licenses/agpl-3.0.html.
18 18
 
19 19
 from django.db import models
  20
+from django.conf import settings
  21
+from django.core.exceptions import ImproperlyConfigured, ValidationError
20 22
 
21 23
 from videos.models import VIDEO_TYPE
22 24
 from .videos.types import (
23 25
     video_type_registrar, UPDATE_VERSION_ACTION, DELETE_LANGUAGE_ACTION
24 26
 )
  27
+from teams.models import Team
  28
+from auth.models import CustomUser as User
  29
+
  30
+from utils.metrics import Meter
25 31
 
26 32
 # for now, they kind of match
27 33
 ACCOUNT_TYPES = VIDEO_TYPE
28 34
 
  35
+
  36
+def youtube_sync(video, language):
  37
+    """
  38
+    Simplified version of what's found in
  39
+    ``ThirdPartyAccount.mirror_on_third_party``.  It doesn't bother checking if
  40
+    we should be syncing this or not.  Only does the new Youtube/Amara
  41
+    integration syncing.  Used on debug page for video.
  42
+    """
  43
+    version = language.latest_version()
  44
+
  45
+    if version:
  46
+        if not version.is_public or not version.is_synced():
  47
+            return
  48
+
  49
+    always_push_account = ThirdPartyAccount.objects.always_push_account()
  50
+
  51
+    for vurl in video.videourl_set.all():
  52
+        vt = video_type_registrar.video_type_for_url(vurl.url)
  53
+
  54
+        try:
  55
+            vt.update_subtitles(version, always_push_account)
  56
+            Meter('youtube.push.success').inc()
  57
+        except:
  58
+            Meter('youtube.push.fail').inc()
  59
+        finally:
  60
+            Meter('youtube.push.request').inc()
  61
+
  62
+
29 63
 class ThirdPartyAccountManager(models.Manager):
30 64
 
  65
+    def always_push_account(self):
  66
+        """
  67
+        Get the ThirdPartyAccount that is able to push to any video on Youtube.
  68
+        Raise ``ImproperlyConfigured`` if it can't be found.
  69
+        """
  70
+        username = getattr(settings, 'YOUTUBE_ALWAYS_PUSH_USERNAME')
  71
+
  72
+        try:
  73
+            return self.get(username=username)
  74
+        except ThirdPartyAccount.DoesNotExist:
  75
+            raise ImproperlyConfigured("Can't find youtube account")
  76
+
31 77
     def mirror_on_third_party(self, video, language, action, version=None):
32 78
         """
33 79
         Does the specified action (video.types.UPDATE_VERSION_ACTION or
@@ -52,8 +98,29 @@ def mirror_on_third_party(self, video, language, action, version=None):
52 98
                 # We can't mirror unsynced or non-public versions.
53 99
                 return
54 100
 
  101
+        try:
  102
+            rule = YoutubeSyncRule.objects.all()[0]
  103
+            should_sync = rule.should_sync(video)
  104
+            always_push_account = self.always_push_account()
  105
+        except IndexError:
  106
+            should_sync = False
  107
+
55 108
         for vurl in video.videourl_set.all():
  109
+            already_updated = False
  110
+            vt = video_type_registrar.video_type_for_url(vurl.url)
  111
+
  112
+            if should_sync:
  113
+                try:
  114
+                    vt.update_subtitles(version, always_push_account)
  115
+                    already_updated = True
  116
+                    Meter('youtube.push.success').inc()
  117
+                except:
  118
+                    Meter('youtube.push.fail').inc()
  119
+                finally:
  120
+                    Meter('youtube.push.request').inc()
  121
+
56 122
             username = vurl.owner_username
  123
+
57 124
             if not username:
58 125
                 continue
59 126
             try:
@@ -61,13 +128,13 @@ def mirror_on_third_party(self, video, language, action, version=None):
61 128
             except ThirdPartyAccount.DoesNotExist:
62 129
                 continue
63 130
 
64  
-            vt = video_type_registrar.video_type_for_url(vurl.url)
65 131
             if hasattr(vt, action):
66  
-                if action == UPDATE_VERSION_ACTION:
  132
+                if action == UPDATE_VERSION_ACTION and not already_updated:
67 133
                     vt.update_subtitles(version, account)
68 134
                 elif action == DELETE_LANGUAGE_ACTION:
69 135
                     vt.delete_subtitles(language, account)
70 136
 
  137
+
71 138
 class ThirdPartyAccount(models.Model):
72 139
     """
73 140
     Links a third party account (e.g. YouTube's') to a certain video URL
@@ -90,4 +157,91 @@ class ThirdPartyAccount(models.Model):
90 157
     
91 158
     class Meta:
92 159
         unique_together = ("type", "username")
93  
-    
  160
+
  161
+    def __unicode__(self):
  162
+        return '%s - %s' % (self.get_type_display(), self.username)
  163
+
  164
+
  165
+class YoutubeSyncRule(models.Model):
  166
+    """
  167
+    An instance of this class determines which Youtube videos should be synced
  168
+    back to Youtube via the new integration.
  169
+
  170
+    There should only ever be one instance of this class in the database.
  171
+
  172
+    You should run a query and then call it like this:
  173
+
  174
+        rule = YoutubeSyncRule.objects.all()[0]
  175
+        rule.should_sync(video)
  176
+
  177
+    Where ``video`` is a ``videos.models.Video`` instance.
  178
+
  179
+    ``team`` should be a comma-separated list of team slugs that you want to
  180
+    sync.  ``user`` should be a comma-separated list of usernames of users
  181
+    whose videos should be synced.  ``video`` is a list of primary keys of
  182
+    videos that should be synced.
  183
+
  184
+    You can also specify a wildcard "*" to any of the above to match any teams,
  185
+    any users, or any videos.
  186
+    """
  187
+    team = models.TextField(default='', blank=True,
  188
+            help_text='Comma separated list of slugs')
  189
+    user = models.TextField(default='', blank=True,
  190
+            help_text='Comma separated list of usernames')
  191
+    video = models.TextField(default='', blank=True,
  192
+            help_text='Comma separated list of pks')
  193
+
  194
+    def __unicode__(self):
  195
+        return 'Youtube sync rule'
  196
+
  197
+    def team_in_list(self, team):
  198
+        if not team:
  199
+            return False
  200
+        teams = self.team.split(',')
  201
+        if '*' in teams:
  202
+            return True
  203
+        return team in teams
  204
+
  205
+    def user_in_list(self, user):
  206
+        users = self.user.split(',')
  207
+        if '*' in users:
  208
+            return True
  209
+        return user.username in users
  210
+
  211
+    def video_in_list(self, pk):
  212
+        pks = self.video.split(',')
  213
+        if '*' in pks:
  214
+            return True
  215
+        if len(pks) == 1 and pks[0] == '':
  216
+            return False
  217
+        return pk in map(int, pks)
  218
+
  219
+    def should_sync(self, video):
  220
+        tv = video.get_team_video()
  221
+        team = None
  222
+        if tv:
  223
+            team = tv.team.slug
  224
+
  225
+        return self.team_in_list(team) or \
  226
+                self.user_in_list(video.user) or \
  227
+                self.video_in_list(video.pk)
  228
+
  229
+    def _clean(self, name):
  230
+        if name not in ['team', 'user']:
  231
+            return
  232
+        field  = getattr(self, name)
  233
+        values = set(field.split(','))
  234
+        values = [v for v in values if v != '*']
  235
+        if len(values) == 1 and values[0] == '':
  236
+            return []
  237
+        return values
  238
+
  239
+    def clean(self):
  240
+        teams = self._clean('team')
  241
+        users = self._clean('user')
  242
+
  243
+        if len(teams) != Team.objects.filter(slug__in=teams).count():
  244
+            raise ValidationError("One or more teams not found")
  245
+
  246
+        if len(users) != User.objects.filter(username__in=users).count():
  247
+            raise ValidationError("One or more users not found")
74  apps/accountlinker/tests.py
... ...
@@ -1,16 +1,66 @@
1  
-"""
2  
-This file demonstrates writing tests using the unittest module. These will pass
3  
-when you run "manage.py test".
4  
-
5  
-Replace this with more appropriate tests for your application.
6  
-"""
  1
+# Amara, universalsubtitles.org
  2
+#
  3
+# Copyright (C) 2012 Participatory Culture Foundation
  4
+#
  5
+# This program is free software: you can redistribute it and/or modify
  6
+# it under the terms of the GNU Affero General Public License as
  7
+# published by the Free Software Foundation, either version 3 of the
  8
+# License, or (at your option) any later version.
  9
+#
  10
+# This program is distributed in the hope that it will be useful,
  11
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
  12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13
+# GNU Affero General Public License for more details.
  14
+#
  15
+# You should have received a copy of the GNU Affero General Public License
  16
+# along with this program. If not, see
  17
+# http://www.gnu.org/licenses/agpl-3.0.html.
7 18
 
8 19
 from django.test import TestCase
  20
+from django.conf import settings
  21
+from django.core.exceptions import ImproperlyConfigured
  22
+
  23
+from accountlinker.models import ThirdPartyAccount, YoutubeSyncRule
  24
+from videos.models import Video
  25
+from auth.models import CustomUser as User
  26
+
  27
+
  28
+class AccountTest(TestCase):
  29
+    fixtures = ["staging_users.json", "staging_videos.json", "staging_teams.json"]
  30
+
  31
+    def test_retrieval(self):
  32
+
  33
+        acc = ThirdPartyAccount.objects.create(type='Y', username='abc',
  34
+                oauth_access_token='a', oauth_refresh_token='b')
  35
+
  36
+        with self.assertRaises(ImproperlyConfigured):
  37
+            ThirdPartyAccount.objects.always_push_account()
  38
+
  39
+        setattr(settings, 'YOUTUBE_ALWAYS_PUSH_USERNAME', 'abc')
  40
+        self.assertEquals(ThirdPartyAccount.objects.always_push_account().pk,
  41
+                acc.pk)
  42
+
  43
+    def test_rules(self):
  44
+        video = Video.objects.filter(teamvideo__isnull=False)[0]
  45
+        video.user = User.objects.get(username='admin')
  46
+        team = video.get_team_video().team
  47
+        team = team.slug
  48
+
  49
+        r = YoutubeSyncRule.objects.create()
  50
+        self.assertFalse(r.should_sync(video))
  51
+
  52
+        YoutubeSyncRule.objects.all().delete()
  53
+        r = YoutubeSyncRule.objects.create(team=team)
  54
+        self.assertTrue(r.should_sync(video))
  55
+
  56
+        YoutubeSyncRule.objects.all().delete()
  57
+        r = YoutubeSyncRule.objects.create(user='admin')
  58
+        self.assertTrue(r.should_sync(video))
9 59
 
  60
+        YoutubeSyncRule.objects.all().delete()
  61
+        r = YoutubeSyncRule.objects.create(video='*')
  62
+        self.assertTrue(r.should_sync(video))
10 63
 
11  
-class SimpleTest(TestCase):
12  
-    def test_basic_addition(self):
13  
-        """
14  
-        Tests that 1 + 1 always equals 2.
15  
-        """
16  
-        self.assertEqual(1 + 1, 2)
  64
+        YoutubeSyncRule.objects.all().delete()
  65
+        r = YoutubeSyncRule.objects.create(team='*')
  66
+        self.assertTrue(r.should_sync(video))
8  apps/accountlinker/views.py
@@ -43,8 +43,8 @@ def _generate_youtube_oauth_request_link(state_str=None):
43 43
     
44 44
     params = {
45 45
         "client_id": settings.YOUTUBE_CLIENT_ID,
46  
-        "redirect_uri": 
47  
-            universal_url("accountlinker:youtube-oauth-callback"),
  46
+        "redirect_uri":  "https://%s%s" % (Site.objects.get_current().domain, 
  47
+            reverse("accountlinker:youtube-oauth-callback")),
48 48
         "scope": "https://gdata.youtube.com",
49 49
         "state": state,
50 50
         "response_type": "code",
@@ -78,7 +78,8 @@ def youtube_oauth_callback(request):
78 78
     params = {
79 79
         "client_id": settings.YOUTUBE_CLIENT_ID,
80 80
         "client_secret": settings.YOUTUBE_CLIENT_SECRET,
81  
-        "redirect_uri": universal_url("accountlinker:youtube-oauth-callback"),
  81
+        "redirect_uri": universal_url("accountlinker:youtube-oauth-callback",
  82
+            protocol_override='https'),
82 83
         "code": code,
83 84
         "grant_type": "authorization_code",
84 85
         
@@ -92,6 +93,7 @@ def youtube_oauth_callback(request):
92 93
                     "data": {
93 94
                         "sent_params": params,
94 95
                         "original_request": request,
  96
+                        "response": response.content
95 97
                     },
96 98
                 })
97 99
                     
267  apps/auth/migrations/0026_auto__add_field_customuser_partner_fk.py
... ...
@@ -0,0 +1,267 @@
  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 'CustomUser.partner_fk'
  12
+        db.add_column('auth_customuser', 'partner_fk', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['teams.Partner'], null=True, blank=True), keep_default=False)
  13
+    
  14
+    
  15
+    def backwards(self, orm):
  16
+        
  17
+        # Deleting field 'CustomUser.partner_fk'
  18
+        db.delete_column('auth_customuser', 'partner_fk_id')
  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.announcement': {
  31
+            'Meta': {'object_name': 'Announcement'},
  32
+            'content': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
  33
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  34
+            'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  35
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
  36
+        },
  37
+        'auth.awards': {
  38
+            'Meta': {'object_name': 'Awards'},
  39
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  40
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  41
+            'points': ('django.db.models.fields.IntegerField', [], {}),
  42
+            'type': ('django.db.models.fields.IntegerField', [], {}),
  43
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True'})
  44
+        },
  45
+        'auth.customuser': {
  46
+            'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
  47
+            'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  48
+            'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  49
+            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  50
+            'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  51
+            'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  52
+            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  53
+            'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  54
+            'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
  55
+            'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  56
+            'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  57
+            'partner': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
  58
+            'partner_fk': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
  59
+            'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
  60
+            'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  61
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
  62
+            'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  63
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
  64
+        },
  65
+        'auth.emailconfirmation': {
  66
+            'Meta': {'object_name': 'EmailConfirmation'},
  67
+            'confirmation_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
  68
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  69
+            'sent': ('django.db.models.fields.DateTimeField', [], {}),
  70
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  71
+        },
  72
+        'auth.group': {
  73
+            'Meta': {'object_name': 'Group'},
  74
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  75
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  76
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  77
+        },
  78
+        'auth.logintoken': {
  79
+            'Meta': {'object_name': 'LoginToken'},
  80
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  81
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  82
+            'token': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
  83
+            'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'login_token'", 'unique': 'True', 'to': "orm['auth.CustomUser']"})
  84
+        },
  85
+        'auth.message': {
  86
+            'Meta': {'object_name': 'Message'},
  87
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  88
+            'message': ('django.db.models.fields.TextField', [], {}),
  89
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'_message_set'", 'to': "orm['auth.User']"})
  90
+        },
  91
+        'auth.permission': {
  92
+            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  93
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  94
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  95
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  96
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  97
+        },
  98
+        'auth.user': {
  99
+            'Meta': {'object_name': 'User'},
  100
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  101
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  102
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  103
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  104
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  105
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  106
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  107
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  108
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  109
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  110
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  111
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  112
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  113
+        },
  114
+        'auth.userlanguage': {
  115
+            'Meta': {'unique_together': "(['user', 'language'],)", 'object_name': 'UserLanguage'},
  116
+            'follow_requests': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  117
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  118
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  119
+            'proficiency': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  120
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  121
+        },
  122
+        'contenttypes.contenttype': {
  123
+            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  124
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  125
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  126
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  127
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  128
+        },
  129
+        'teams.application': {
  130
+            'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
  131
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  132
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  133
+            'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  134
+            'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  135
+            'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  136
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
  137
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
  138
+        },
  139
+        'teams.partner': {
  140
+            'Meta': {'object_name': 'Partner'},
  141
+            'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  142
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  143
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  144
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  145
+        },
  146
+        'teams.project': {
  147
+            'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
  148
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  149
+            'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  150
+            'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  151
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  152
+            'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
  153
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  154
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  155
+            'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
  156
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  157
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  158
+        },
  159
+        'teams.team': {
  160
+            'Meta': {'object_name': 'Team'},
  161
+            'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
  162
+            'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  163
+            'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
  164
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  165
+            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  166
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  167
+            'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  168
+            'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  169
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  170
+            'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  171
+            'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  172
+            'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  173
+            'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
  174
+            'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  175
+            'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
  176
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  177
+            'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  178
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
  179
+            'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  180
+            'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  181
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  182
+            'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  183
+            'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  184
+            'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  185
+            'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
  186
+            'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  187
+            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
  188
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
  189
+            'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  190
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
  191
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  192
+        },
  193
+        'teams.teammember': {
  194
+            'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
  195
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  196
+            'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
  197
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
  198
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
  199
+        },
  200
+        'teams.teamvideo': {
  201
+            'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
  202
+            'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
  203
+            'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  204
+            'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
  205
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  206
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  207
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  208
+            'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
  209
+            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
  210
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  211
+            'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  212
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  213
+            'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
  214
+        },
  215
+        'videos.subtitlelanguage': {
  216
+            'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
  217
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  218
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  219
+            'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  220
+            'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  221
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  222
+            'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  223
+            'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  224
+            'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  225
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  226
+            'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  227
+            'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
  228
+            'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  229
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  230
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  231
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  232
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  233
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  234
+        },
  235
+        'videos.video': {
  236
+            'Meta': {'object_name': 'Video'},
  237
+            'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  238
+            'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  239
+            'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  240
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  241
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  242
+            'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
  243
+            'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
  244
+            'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  245
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  246
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  247
+            'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  248
+            'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  249
+            'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  250
+            'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
  251
+            's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  252
+            'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  253
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  254
+            'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  255
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  256
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  257
+            'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
  258
+            'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  259
+            'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  260
+            'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  261
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  262
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  263
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  264
+        }
  265
+    }
  266
+    
  267
+    complete_apps = ['auth']
271  apps/auth/migrations/0027_normalize_partner.py
... ...
@@ -0,0 +1,271 @@
  1
+# encoding: utf-8
  2
+import datetime
  3
+from south.db import db
  4
+from south.v2 import DataMigration
  5
+from django.db import models
  6
+
  7
+class Migration(DataMigration):
  8
+    
  9
+    def forwards(self, orm):
  10
+        "Write your forwards methods here."
  11
+        for user in orm.CustomUser.objects.all():
  12
+            slug = user.partner
  13
+
  14
+            if not slug:
  15
+                continue
  16
+
  17
+            partner, _ = orm['teams.Partner'].objects.get_or_create(slug=slug,
  18
+                    name=slug)
  19
+            user.partner_fk = partner
  20
+            user.save()
  21
+    
  22
+    def backwards(self, orm):
  23
+        "Write your backwards methods here."
  24
+    
  25
+    models = {
  26
+        'accountlinker.thirdpartyaccount': {
  27
+            'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
  28
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  29
+            'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  30
+            'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
  31
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
  32
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
  33
+        },
  34
+        'auth.announcement': {
  35
+            'Meta': {'object_name': 'Announcement'},
  36
+            'content': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
  37
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  38
+            'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  39
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
  40
+        },
  41
+        'auth.awards': {
  42
+            'Meta': {'object_name': 'Awards'},
  43
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  44
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  45
+            'points': ('django.db.models.fields.IntegerField', [], {}),
  46
+            'type': ('django.db.models.fields.IntegerField', [], {}),
  47
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True'})
  48
+        },
  49
+        'auth.customuser': {
  50
+            'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
  51
+            'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  52
+            'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  53
+            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  54
+            'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  55
+            'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  56
+            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  57
+            'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  58
+            'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
  59
+            'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  60
+            'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  61
+            'partner': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
  62
+            'partner_fk': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
  63
+            'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
  64
+            'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  65
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
  66
+            'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  67
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
  68
+        },
  69
+        'auth.emailconfirmation': {
  70
+            'Meta': {'object_name': 'EmailConfirmation'},
  71
+            'confirmation_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
  72
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  73
+            'sent': ('django.db.models.fields.DateTimeField', [], {}),
  74
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  75
+        },
  76
+        'auth.group': {
  77
+            'Meta': {'object_name': 'Group'},
  78
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  79
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  80
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  81
+        },
  82
+        'auth.logintoken': {
  83
+            'Meta': {'object_name': 'LoginToken'},
  84
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  85
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  86
+            'token': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
  87
+            'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'login_token'", 'unique': 'True', 'to': "orm['auth.CustomUser']"})
  88
+        },
  89
+        'auth.message': {
  90
+            'Meta': {'object_name': 'Message'},
  91
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  92
+            'message': ('django.db.models.fields.TextField', [], {}),
  93
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'_message_set'", 'to': "orm['auth.User']"})
  94
+        },
  95
+        'auth.permission': {
  96
+            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  97
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  98
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  99
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  100
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  101
+        },
  102
+        'auth.user': {
  103
+            'Meta': {'object_name': 'User'},
  104
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  105
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  106
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  107
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  108
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  109
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  110
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  111
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  112
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  113
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  114
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  115
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  116
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  117
+        },
  118
+        'auth.userlanguage': {
  119
+            'Meta': {'unique_together': "(['user', 'language'],)", 'object_name': 'UserLanguage'},
  120
+            'follow_requests': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  121
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  122
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
  123
+            'proficiency': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  124
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
  125
+        },
  126
+        'contenttypes.contenttype': {
  127
+            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  128
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  129
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  130
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  131
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  132
+        },
  133
+        'teams.application': {
  134
+            'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
  135
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  136
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  137
+            'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  138
+            'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  139
+            'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  140
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
  141
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
  142
+        },
  143
+        'teams.partner': {
  144
+            'Meta': {'object_name': 'Partner'},
  145
+            'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  146
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  147
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  148
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  149
+        },
  150
+        'teams.project': {
  151
+            'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
  152
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  153
+            'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  154
+            'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
  155
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  156
+            'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
  157
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  158
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  159
+            'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
  160
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  161
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  162
+        },
  163
+        'teams.team': {
  164
+            'Meta': {'object_name': 'Team'},
  165
+            'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
  166
+            'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  167
+            'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
  168
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  169
+            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  170
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  171
+            'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  172
+            'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  173
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  174
+            'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  175
+            'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  176
+            'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  177
+            'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
  178
+            'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  179
+            'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
  180
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
  181
+            'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  182
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
  183
+            'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  184
+            'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  185
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  186
+            'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  187
+            'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  188
+            'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
  189
+            'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
  190
+            'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
  191
+            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
  192
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
  193
+            'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  194
+            'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
  195
+            'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
  196
+        },
  197
+        'teams.teammember': {
  198
+            'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
  199
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  200
+            'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
  201
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
  202
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
  203
+        },
  204
+        'teams.teamvideo': {
  205
+            'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
  206
+            'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
  207
+            'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  208
+            'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
  209
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  210
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  211
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  212
+            'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
  213
+            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
  214
+            'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
  215
+            'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  216
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  217
+            'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
  218
+        },
  219
+        'videos.subtitlelanguage': {
  220
+            'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
  221
+            'created': ('django.db.models.fields.DateTimeField', [], {}),
  222
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  223
+            'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  224
+            'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  225
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  226
+            'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  227
+            'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  228
+            'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  229
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
  230
+            'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  231
+            'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
  232
+            'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  233
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  234
+            'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
  235
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  236
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
  237
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  238
+        },
  239
+        'videos.video': {
  240
+            'Meta': {'object_name': 'Video'},
  241
+            'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  242
+            'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  243
+            'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  244
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
  245
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  246
+            'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
  247
+            'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
  248
+            'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
  249
+            'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
  250
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  251
+            'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
  252
+            'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
  253
+            'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  254
+            'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
  255
+            's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
  256
+            'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  257
+            'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  258
+            'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
  259
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
  260
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
  261
+            'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
  262
+            'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
  263
+            'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
  264
+            'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
  265
+            'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
  266
+            'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
  267
+            'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
  268
+        }
  269
+    }
  270
+    
  271
+    complete_apps = ['auth']
153  apps/icanhaz/migrations/0001_initial.py → ...ations/0028_auto__del_field_customuser_partner.py
@@ -8,50 +8,85 @@ class Migration(SchemaMigration):
8 8
     
9 9
     def forwards(self, orm):
10 10
         
11  
-        # Adding model 'VideoVisibilityPolicy'
12  
-        db.create_table('icanhaz_videovisibilitypolicy', (
13  
-            ('site_secret_key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40)),
14  
-            ('embed_allowed_domains', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
15  
-            ('created', self.gf('django.db.models.fields.DateTimeField')(blank=True)),
16  
-            ('site_visibility_policy', self.gf('django.db.models.fields.CharField')(default='public', max_length=32)),
17  
-            ('widget_visibility_policy', self.gf('django.db.models.fields.CharField')(default='public', max_length=32)),
18  
-            ('modified', self.gf('django.db.models.fields.DateTimeField')(blank=True)),
19  
-            ('object_id', self.gf('django.db.models.fields.IntegerField')(blank=True)),
20  
-            ('video', self.gf('django.db.models.fields.related.OneToOneField')(related_name='_policy', unique=True, to=orm['videos.Video'])),
21  
-            ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='content_type_set_for_visibility_policy', null=True, to=orm['contenttypes.ContentType'])),
22  
-            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23  
-        ))
24  
-        db.send_create_signal('icanhaz', ['VideoVisibilityPolicy'])
  11
+        # Deleting field 'CustomUser.partner'
  12
+        db.delete_column('auth_customuser', 'partner')
25 13
     
26 14
     
27 15
     def backwards(self, orm):
28 16
         
29  
-        # Deleting model 'VideoVisibilityPolicy'
30  
-        db.delete_table('icanhaz_videovisibilitypolicy')
  17
+        # Adding field 'CustomUser.partner'
  18
+        db.add_column('auth_customuser', 'partner', self.gf('django.db.models.fields.CharField')(blank=True, max_length=32, null=True, db_index=True), keep_default=False)
31 19
     
32 20
     
33 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': &#