aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/source/siteadmin/production-deployments.rst3
-rw-r--r--mediagoblin/edit/views.py1
-rw-r--r--mediagoblin/media_types/video/models.py2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/prev_next.html15
4 files changed, 16 insertions, 5 deletions
diff --git a/docs/source/siteadmin/production-deployments.rst b/docs/source/siteadmin/production-deployments.rst
index e65ac332..b7417213 100644
--- a/docs/source/siteadmin/production-deployments.rst
+++ b/docs/source/siteadmin/production-deployments.rst
@@ -69,6 +69,9 @@ modify it to suit your environment's setup:
Group=mediagoblin
Type=simple
WorkingDirectory=/srv/mediagoblin.example.org/mediagoblin
+ # Start mg-celeryd process as root, then switch to mediagoblin user/group
+ # (This is needed to run the ExecStartPre commands)
+ PermissionsStartOnly=true
# Create directory for PID (if needed) and set ownership
ExecStartPre=/bin/mkdir -p /run/mediagoblin
ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index 521359f5..b15fb2e7 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -443,6 +443,7 @@ def verify_email(request):
user=user.username)
+@require_active_login
def change_email(request):
""" View to change the user's email """
form = forms.ChangeEmailForm(request.form)
diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py
index 4742b342..da635ed7 100644
--- a/mediagoblin/media_types/video/models.py
+++ b/mediagoblin/media_types/video/models.py
@@ -69,7 +69,7 @@ class VideoData(Base):
orig_metadata = self.orig_metadata or {}
if ("webm_video" not in self.get_media_entry.media_files
- and "mimetype" in orig_metadata['common']['tags']
+ and "mimetype" in orig_metadata.get('common', {}).get('tags', {})
and "codec" in orig_metadata['audio']
and "codec" in orig_metadata['video']):
if orig_metadata['mimetype'] == 'application/ogg':
diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html
index 9e262ed9..fc8672fb 100644
--- a/mediagoblin/templates/mediagoblin/utils/prev_next.html
+++ b/mediagoblin/templates/mediagoblin/utils/prev_next.html
@@ -19,29 +19,36 @@
{# Provide navigation links to neighboring media entries, if possible #}
{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
{% set next_entry_url = media.url_to_next(request.urlgen) %}
+{% if is_rtl %}
+ {% set next_arrow = "→" %}
+ {% set prev_arrow = "←" %}
+{% else %}
+ {% set next_arrow = "←" %}
+ {% set prev_arrow = "→" %}
+{% endif %}
{% if prev_entry_url or next_entry_url %}
<div class="navigation">
{# There are no previous entries for the very first media entry #}
{% if prev_entry_url %}
<a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
- &larr; {% trans %}newer{% endtrans %}
+ {{next_arrow}} {% trans %}newer{% endtrans %}
</a>
{% else %}
{# This is the first entry. display greyed-out 'previous' image #}
<p class="navigation_button navigation_left">
- &larr; {% trans %}newer{% endtrans %}
+ {{next_arrow}} {% trans %}newer{% endtrans %}
</p>
{% endif %}
{# Likewise, this could be the very last media entry #}
{% if next_entry_url %}
<a class="navigation_button navigation_right" href="{{ next_entry_url }}">
- {% trans %}older{% endtrans %} &rarr;
+ {% trans %}older{% endtrans %} {{prev_arrow}}
</a>
{% else %}
{# This is the last entry. display greyed-out 'next' image #}
<p class="navigation_button navigation_right">
- {% trans %}older{% endtrans %} &rarr;
+ {% trans %}older{% endtrans %} {{prev_arrow}}
</p>
{% endif %}
</div>