diff --git a/digitalglarus/templates/language_chooser.html b/digitalglarus/templates/language_chooser.html
index bf5ac078..33b8a6b4 100644
--- a/digitalglarus/templates/language_chooser.html
+++ b/digitalglarus/templates/language_chooser.html
@@ -1,9 +1,9 @@
{% load i18n menu_tags %}
{% if languages|length > 1 %}
-
+
{% for language in languages %}
- -
+
-
{{ language.1 }}
diff --git a/digitalglarus/views.py b/digitalglarus/views.py
index ff67e0d6..20f81cd9 100644
--- a/digitalglarus/views.py
+++ b/digitalglarus/views.py
@@ -70,7 +70,8 @@ def letscowork(request):
def blog(request):
tags = ["digitalglarus"]
- posts = Post.objects.filter_by_language(get_language()).filter(tags__name__in=tags, publish=True)
+ posts = Post.objects.filter(tags__name__in=tags, publish=True).translated(get_language())
+ # posts = Post.objects.filter_by_language(get_language()).filter(tags__name__in=tags, publish=True)
context = {
'post_list': posts,
}
diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html
index 5f0604a7..c71434e7 100644
--- a/hosting/templates/hosting/base_short.html
+++ b/hosting/templates/hosting/base_short.html
@@ -10,7 +10,7 @@
- Payment
+ nngleich
diff --git a/membership/admin.py b/membership/admin.py
index 5cd50ebd..148f9ab6 100644
--- a/membership/admin.py
+++ b/membership/admin.py
@@ -1,4 +1,20 @@
from django.contrib import admin
from .models import CustomUser
+from django.contrib.auth.hashers import make_password
-admin.site.register(CustomUser)
+
+class CustomUserAdmin(admin.ModelAdmin):
+ fields = ('password', 'user_permissions', 'email', 'is_admin')
+
+ def save_model(self, request, obj, form, change):
+ password = form.cleaned_data.get('password')
+
+ if not change:
+ obj.validation_slug = make_password(None)
+
+ obj.set_password(password)
+ obj.save()
+ return obj
+
+
+admin.site.register(CustomUser, CustomUserAdmin)
diff --git a/ungleich/templates/cms/ungleichch/_header_base.html b/ungleich/templates/cms/ungleichch/_header_base.html
index 35e1973c..d32f72e6 100644
--- a/ungleich/templates/cms/ungleichch/_header_base.html
+++ b/ungleich/templates/cms/ungleichch/_header_base.html
@@ -1,4 +1,4 @@
-{% load cms_tags staticfiles %}
+{% load i18n cms_tags staticfiles menu_tags sekizai_tags %}
diff --git a/ungleich/templates/cms/ungleichch/base_ungleich.html b/ungleich/templates/cms/ungleichch/base_ungleich.html
index 6f70a4a8..30dfdeb9 100644
--- a/ungleich/templates/cms/ungleichch/base_ungleich.html
+++ b/ungleich/templates/cms/ungleichch/base_ungleich.html
@@ -36,10 +36,12 @@
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
+
{% cms_toolbar %}
{% show_menu 0 0 0 1 "cms/ungleichch/_menu.html" %}
+
{% block base_header %}
{% include "cms/ungleichch/_header_base.html" %}
{% endblock %}
diff --git a/ungleich/views.py b/ungleich/views.py
index 68179c3b..5e829693 100644
--- a/ungleich/views.py
+++ b/ungleich/views.py
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.shortcuts import render
from django.utils.translation import get_language
from djangocms_blog.models import Post
@@ -8,7 +9,6 @@ from djangocms_blog.settings import get_setting
def blog(request):
posts = Post.objects.all()
- print(posts)
context = {
'post_list': posts
}
@@ -26,6 +26,9 @@ class PostListViewUngleich(PostListView):
def get_context_data(self, **kwargs):
context = super(PostListView, self).get_context_data(**kwargs)
context['TRUNCWORDS_COUNT'] = get_setting('POSTS_LIST_TRUNCWORDS_COUNT')
+ context['languages'] = settings.LANGUAGES
+ context['current_language'] = get_language()
+
return context
def get_paginate_by(self, queryset):