Permalink
Browse files

Made login required on the new editor, ripe for revision if we ever w…

…ant a demo mode
  • Loading branch information...
1 parent 3fe3736 commit 6812264666d88e663b90c9da7abb3c045a8b9b84 @arthur-debert arthur-debert committed Dec 28, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −0 apps/subtitles/tests/__init__.py
  2. +2 −0 apps/subtitles/views.py
  3. +1 −1 urls.py
View
1 apps/subtitles/tests/__init__.py
@@ -1,4 +1,5 @@
from apps.subtitles.tests.collaborators import *
from apps.subtitles.tests.compat import *
+from apps.subtitles.tests.editor import *
from apps.subtitles.tests.models import *
from apps.subtitles.tests.pipeline import *
View
2 apps/subtitles/views.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
import json
+from django.contrib.auth.decorators import login_required
from videos.models import Video
from subtitles.models import SubtitleLanguage, SubtitleVersion
@@ -67,6 +68,7 @@ def _language_data(language, editing_version, translated_from_version):
'versions': versions_data,
}
+@login_required
def subtitle_editor(request, video_id, language_code, task_id=None):
'''
Renders the subtitle-editor page, with all data neeeded for the UI
View
2 urls.py
@@ -81,7 +81,7 @@
url(r'^admin/',
include(admin.site.urls)),
url(r'^subtitles/',
- include('subtitles.urls')),
+ include('subtitles.urls', namespace='subtitles')),
url(r'^embed(?P<version_no>\d+)?.js$', 'widget.views.embed',
name="widget-embed"),
url(r'^widget_demo/$',

0 comments on commit 6812264

Please sign in to comment.