- Added list_filter in admin.py for more models.
- IP bans now work when not signed in
- Invites are void if you are banned or disabled.
- Removed Discord video support (it was a pointless feature)
- Various HTML changes
- Made the theme much darker.
- Changed the color of the logo and favicon.

Too lazy to change the rest of the assets for now.
This commit is contained in:
some weird guy
2023-09-29 14:41:44 -07:00
parent 85047883cc
commit e572f997d2
17 changed files with 315 additions and 339 deletions
+9 -9
View File
@@ -46,6 +46,15 @@ class CheckForBanMiddleware:
return response
def process_view(self, request, view_func, view_args, view_kwargs):
# Get one active ban that is not expired for the IP address
ip_address = request.META.get('REMOTE_ADDR')
active_ip_ban = Ban.objects.filter(
ip_address=ip_address,
active=True,
expiry_date__gte=timezone.now(),).first()
if active_ip_ban:
context = {'ban': active_ip_ban}
return render(request, 'ban.html', context)
if not request.user.is_authenticated:
return None
# Get one active ban that is not expired for the user
@@ -56,15 +65,6 @@ class CheckForBanMiddleware:
if active_user_ban:
context = {'ban': active_user_ban}
return render(request, 'ban.html', context)
# Get one active ban that is not expired for the IP address
ip_address = request.META.get('REMOTE_ADDR')
active_ip_ban = Ban.objects.filter(
ip_address=ip_address,
active=True,
expiry_date__gte=timezone.now(),).first()
if active_ip_ban:
context = {'ban': active_ip_ban}
return render(request, 'ban.html', context)
return None
class ClosedMiddleware(object):