Browse files

Add default gravatar and fix og:url property.

  • Loading branch information...
1 parent 2ab4cda commit 08ac4d62c3a932d207077745e345beb2f59df2e9 @Osmose Osmose committed Feb 13, 2013
View
2 flicks/base/templates/bare.html
@@ -16,7 +16,7 @@
<meta property="og:title" content="{% block og_title %}{{ _('Firefox Flicks') }}{% endblock %}">
<meta property="og:type" content="{% block og_type %}website{% endblock %}">
<meta property="og:image" content="{% block og_image %}{{ static('img/flicks-logo-180.png') }}{% endblock %}">
- <meta property="og:url" content="{% block og_url %}http://firefoxflicks.mozilla.org/{% endblock %}">
+ <meta property="og:url" content="{% block og_url %}{{ request.build_absolute_uri() }}{% endblock %}">
<meta property="og:site_name" content="{{ _('Firefox Flicks') }}">
{% block meta_description -%}
<meta property="og:description" content="{% trans %}
View
4 flicks/settings/base.py
@@ -164,10 +164,6 @@
# Allow robots to crawl the site.
ENGAGE_ROBOTS = True
-# Gravatar Settings
-GRAVATAR_URL = 'https://secure.gravatar.com'
-DEFAULT_GRAVATAR = MEDIA_URL + 'img/anon_user.png'
-
# Vimeo API
VIMEO_USER_ID = ''
VIMEO_CLIENT_KEY = u''
View
3 flicks/users/helpers.py
@@ -2,6 +2,7 @@
from django.conf import settings
from django.contrib.auth.models import User
+from django.contrib.staticfiles.storage import staticfiles_storage
from django.utils.hashcompat import md5_constructor
from jingo import register
@@ -12,7 +13,7 @@
GRAVATAR_URL = getattr(settings, 'GRAVATAR_URL', 'https://secure.gravatar.com')
-DEFAULT_GRAVATAR = absolutify(settings.DEFAULT_GRAVATAR)
+DEFAULT_GRAVATAR = absolutify(staticfiles_storage.url('img/avatar.png'))
@register.function
View
BIN flicks/users/static/img/avatar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 08ac4d6

Please sign in to comment.