Commit 35ba0085 authored by Robert's avatar Robert

Move asset version, remove stadt.context_processors

parent 820d7d24
Pipeline #872 failed with stage
in 14 minutes and 16 seconds
......@@ -8,7 +8,7 @@ node_modules
static/
whoosh_index
res/img/backdrops
stadt/ASSET_VERSION
ASSET_VERSION
stadt/settings/local.py
*.swp
*.pyc
......
import django
from django.contrib.sites import shortcuts
def settings(request):
......@@ -6,3 +7,10 @@ def settings(request):
'STADTGESTALTEN_LOGO_URL': django.conf.settings.STADTGESTALTEN_LOGO_URL,
'STADTGESTALTEN_SHOW_HEADER': django.conf.settings.STADTGESTALTEN_SHOW_HEADER,
}
def site(request):
return {
'http_origin': request.build_absolute_uri("/").rstrip("/"),
'site': shortcuts.get_current_site(request),
}
{% load staticfiles %}
<meta name="description" content="{{ site_description }}">
<meta name="description" content="{{ about_group.description }}">
<meta property="og:url" content="{{ request.build_absolute_uri }}">
<meta property="og:type" content="website">
<meta property="og:title" content="Stadtgestalten">
<meta property="og:image" content="{{ http_origin }}{% static "stadt/img/logos/logo_text_large.png" %}">
<meta property="og:description" content="{{ site_description }}">
<meta property="og:description" content="{{ about_group.description }}">
<meta property="og:locale" content="de_DE">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@stadtgestalten">
<meta name="twitter:url" content="{{ request.build_absolute_uri }}">
<meta name="twitter:title" content="Gestalte deine Stadt mit Stadtgestalten">
<meta name="twitter:description" content="{{ site_description }}">
<meta name="twitter:description" content="{{ about_group.description }}">
<meta name="twitter:image" content="{{ http_origin }}{% static "stadt/img/logos/logo_text_large.png" %}">
DIR_INSTALL_ROOT ?= usr/share/stadtgestalten
FILE_VERSION_ASSET = stadt/ASSET_VERSION
FILE_VERSION_ASSET = ASSET_VERSION
PYTHON_INSTALL_ARGS = --root "$(DESTDIR)" \
--install-lib="/$(DIR_INSTALL_ROOT)" \
......
from django.contrib.sites import shortcuts
from django.conf import settings
def site(request):
return {
'http_origin': request.build_absolute_uri("/").rstrip("/"),
'site': shortcuts.get_current_site(request),
'site_description':
'Stadtgestalten ist eine neue Internet-Plattform und ermöglicht '
'aktiven, engagierten Menschen und Gruppen in der Stadt, sich '
'unkompliziert zu informieren, zu präsentieren und miteinander zu '
'vernetzen.',
}
def assets(request):
return {'asset_version': settings.ASSET_VERSION}
......@@ -78,6 +78,7 @@ TEMPLATES = [
'builtins': ['core.templatetags.core'],
'context_processors': [
'core.context_processors.settings',
'core.context_processors.site',
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
......@@ -85,8 +86,6 @@ TEMPLATES = [
'features.groups.context_processors.groups',
'features.memberships.context_processors.my_memberships',
'features.stadt.context_processors.page_meta',
'stadt.context_processors.site',
'stadt.context_processors.assets',
],
},
},
......@@ -296,7 +295,7 @@ TAGS_TAGGABLE = (
)
try:
ASSET_VERSION = open(os.path.join(BASE_DIR, "stadt", "ASSET_VERSION"), "r").read().strip()
ASSET_VERSION = open(os.path.join(BASE_DIR, "ASSET_VERSION"), "r").read().strip()
except IOError:
ASSET_VERSION = "trunk"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment