Allow to override site name in pages title
This commit is contained in:
parent
55abcfb545
commit
da6cff729c
4 changed files with 10 additions and 6 deletions
|
@ -1,12 +1,15 @@
|
|||
from django.conf import settings
|
||||
from django.conf import settings as djsettings
|
||||
|
||||
from . import __version__
|
||||
|
||||
def feedback_link(request):
|
||||
|
||||
def settings(request):
|
||||
return {
|
||||
'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK
|
||||
'UMAP_FEEDBACK_LINK': djsettings.UMAP_FEEDBACK_LINK,
|
||||
'SITE_NAME': djsettings.SITE_NAME
|
||||
}
|
||||
|
||||
|
||||
def version(request):
|
||||
return {
|
||||
'UMAP_VERSION': __version__
|
||||
|
|
|
@ -117,7 +117,7 @@ TEMPLATES = [
|
|||
"django.core.context_processors.tz",
|
||||
'social.apps.django_app.context_processors.backends',
|
||||
'social.apps.django_app.context_processors.login_redirect',
|
||||
'umap.context_processors.feedback_link',
|
||||
'umap.context_processors.settings',
|
||||
'umap.context_processors.version',
|
||||
)
|
||||
}
|
||||
|
@ -154,6 +154,7 @@ LEAFLET_STORAGE_EXTRA_URLS = {
|
|||
'ajax_proxy': '/ajax-proxy/?url={url}'
|
||||
}
|
||||
SITE_URL = "http://umap.org"
|
||||
SITE_NAME = 'uMap'
|
||||
UMAP_DEMO_SITE = False
|
||||
UMAP_EXCLUDE_DEFAULT_MAPS = False
|
||||
UMAP_MAPS_PER_PAGE = 5
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block head_title %}uMap{% endblock %}</title>
|
||||
<title>{% block head_title %}{{ SITE_NAME }}{% endblock %}</title>
|
||||
<meta charset="utf-8">
|
||||
{% compress css %}
|
||||
<!-- Included CSS Files (Compressed) -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load leaflet_storage_tags compress i18n %}
|
||||
{% block head_title %}{{ map.name }} - uMap{% endblock %}
|
||||
{% block head_title %}{{ map.name }} - {{ SITE_NAME }}{% endblock %}
|
||||
{% block body_class %}map_detail{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
|
|
Loading…
Reference in a new issue