Compare commits
9 Commits
df6d75ca61
...
e88350ed90
Author | SHA1 | Date | |
---|---|---|---|
e88350ed90 | |||
806a468375 | |||
e80786fc35 | |||
0fdb7895f7 | |||
2ba14a95c1 | |||
2e03c1dbb1 | |||
996d348d25 | |||
0cbcd9bd94 | |||
0b331c6b18 |
|
@ -10,13 +10,12 @@ from asgiref.sync import async_to_sync
|
||||||
from channels.generic.http import AsyncHttpConsumer
|
from channels.generic.http import AsyncHttpConsumer
|
||||||
from channels.layers import get_channel_layer
|
from channels.layers import get_channel_layer
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.shortcuts import get_object_or_404, redirect, render
|
from django.shortcuts import get_object_or_404, redirect, render
|
||||||
from django.views.decorators.http import require_safe, require_http_methods,\
|
from django.views.decorators.http import require_safe, require_http_methods,\
|
||||||
require_POST
|
require_POST
|
||||||
from django.urls import reverse, set_script_prefix
|
from django.urls import reverse
|
||||||
|
|
||||||
from .forms import NewGameForm, JoinGameForm, PlayerFormSet
|
from .forms import NewGameForm, JoinGameForm, PlayerFormSet
|
||||||
from .models import Game, Player, Fear
|
from .models import Game, Player, Fear
|
||||||
|
@ -388,12 +387,6 @@ class StatusLongPollConsumer(AsyncHttpConsumer):
|
||||||
})
|
})
|
||||||
|
|
||||||
async def fear_tracker_invalidate_status(self, event):
|
async def fear_tracker_invalidate_status(self, event):
|
||||||
# get script_prefix for reverse()
|
|
||||||
script_prefix = self.scope.get("root_path", "") or ""
|
|
||||||
if settings.FORCE_SCRIPT_NAME:
|
|
||||||
script_prefix = settings.FORCE_SCRIPT_NAME
|
|
||||||
set_script_prefix(script_prefix)
|
|
||||||
|
|
||||||
no_hash_status = reverse('status',
|
no_hash_status = reverse('status',
|
||||||
kwargs={'access_code': self.access_code})
|
kwargs={'access_code': self.access_code})
|
||||||
await self.send_response(302, b'', headers=[
|
await self.send_response(302, b'', headers=[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user