New design and renaming for the blog which now named chat

This commit is contained in:
Martin Bley
2022-10-04 17:29:21 +02:00
parent 2f970d6eb4
commit 446a55f3e5
6 changed files with 243 additions and 219 deletions

View File

@@ -25,7 +25,8 @@ urlpatterns = [
re_path(r'^accounts/login/', auth_views.LoginView.as_view()),
re_path(r'^accounts/logout/', auth_views.LogoutView.as_view())
]
# Redirect on logout
LOGOUT_REDIRECT_URL = "home"
if settings.DEBUG is True:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@@ -446,7 +446,7 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
pm = RelPostMandant.objects.filter(mandant__in=mandants). \
values_list('post', flat=True)
posts = []
for post in Post.objects.filter(id__in=pm, published=True)[:1]:
for post in Post.objects.filter(id__in=pm, published=True)[:5]:
try:
avatar = UserProfile.objects.get(user_id=post.author_id). \
avatar.name