Commit b1cd86fb authored by Lars Kruse's avatar Lars Kruse

mehr flake8-Konformität

parent d3a7f8ab
[flake8]
exclude = account,api,content,entities,migrations,node_modules,utils
max-line-length = 99
exclude = entities/migrations
ignore = E121,E123,E126,E226,E24,E704,W503
......@@ -3,14 +3,18 @@ from django.conf import settings
from django.contrib.auth import hashers
from features.groups import models as groups_models
def groups(request):
return {
'about_group': groups_models.Group.objects.filter(id=settings.ABOUT_GROUP_ID).first(),
'about_group': groups_models.Group.objects.filter(
id=settings.ABOUT_GROUP_ID).first(),
'all_sidebar_groups': groups_models.Group.objects.scored().order_by('-score'),
}
def statistics(request):
return {
'gestalt_count': models.Gestalt.objects.exclude(user__password__startswith=hashers.UNUSABLE_PASSWORD_PREFIX).count,
'gestalt_count': models.Gestalt.objects.exclude(
user__password__startswith=hashers.UNUSABLE_PASSWORD_PREFIX).count,
'group_count': groups_models.Group.objects.count
}
......@@ -214,7 +214,8 @@ class GroupUpdate(utils_views.ActionMixin, generic.UpdateView):
layout.Field('address', rows=4),
'url',
layout.Field('date_founded', data_component='date'),
bootstrap.PrependedText('slug', '%(domain)s/' % {'domain': sites_models.Site.objects.get_current().domain}),
bootstrap.PrependedText('slug', '{0}/'.format(
sites_models.Site.objects.get_current().domain)),
'closed',
) + super().get_layout()
......
......@@ -2,6 +2,7 @@ from django.contrib.sites import shortcuts
from django.conf import settings
def site(request):
return {
'http_origin': request.build_absolute_uri("/").rstrip("/"),
......
......@@ -228,7 +228,7 @@ ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_LOGIN_ON_PASSWORD_RESET = True
ACCOUNT_USER_DISPLAY = lambda u: u.gestalt # NOQA
ACCOUNT_USER_DISPLAY = lambda u: u.gestalt # noqa: E731
ACCOUNT_USERNAME_REQUIRED = False
......
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