diff options
-rw-r--r-- | chimere/templates/base.html | 5 | ||||
-rw-r--r-- | chimere/views.py | 2 | ||||
-rw-r--r-- | settings.py | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/chimere/templates/base.html b/chimere/templates/base.html index c967b81..286ae88 100644 --- a/chimere/templates/base.html +++ b/chimere/templates/base.html @@ -14,11 +14,16 @@ <meta property="og:url" content="{{current_site}}{% if tiny %}/ty/{{tiny}}{% endif %}" /> {% if current_feature.image %} <meta property="og:image" content="{{current_site}}{{current_feature.image.picture.url}}" /> + {% elif PROJECT_IMAGE %} + <meta property="og:image" content="{{PROJECT_IMAGE}}" /> {% endif %} <meta property="og:description" content="{{current_feature.text_description|cut:'"'}}" /> {% else %} <meta property="og:url" content="{{current_site}}" /> + {% if PROJECT_IMAGE %} + <meta property="og:image" content="{{PROJECT_IMAGE}}" /> + {% endif %} {% endif %} {% endblock %} diff --git a/chimere/views.py b/chimere/views.py index a8fe22e..f2bc5fc 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -211,6 +211,8 @@ def index(request, area_name=None, default_area=None, simple=False, 'has_search': hasattr(settings, 'CHIMERE_SEARCH_ENGINE') and settings.CHIMERE_SEARCH_ENGINE }) + if hasattr(settings, 'PROJECT_IMAGE') and settings.PROJECT_IMAGE: + response_dct['PROJECT_IMAGE'] = settings.PROJECT_IMAGE if hasattr(settings, 'CONTACT_EMAIL') and settings.CONTACT_EMAIL: response_dct['contact_email'] = settings.CONTACT_EMAIL response_dct['share_networks'], net_dct = \ diff --git a/settings.py b/settings.py index ea2716f..0ab3a23 100644 --- a/settings.py +++ b/settings.py @@ -16,6 +16,8 @@ SQL_DEBUG = False # Django settings for chimere project. PROJECT_NAME = 'Chimere' +# url of the project image +PROJECT_IMAGE = '' ROOT_PATH = os.path.realpath(os.path.dirname(__file__)) + "/" EMAIL_HOST = 'localhost' |