Compare commits

...

2 Commits

5 changed files with 10 additions and 1 deletions

View File

@ -55,6 +55,7 @@ INSTALLED_APPS = (
MIDDLEWARE = ( MIDDLEWARE = (
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
@ -145,6 +146,9 @@ BOOTSTRAP3 = {
'javascript_in_head': True, 'javascript_in_head': True,
} }
# whitenoise
STATIC_PATH = os.path.join(BASE_DIR, 'staticfiles')
############### ###############
# web options # # web options #
############### ###############

View File

@ -158,7 +158,7 @@ class DrReactor(irc.client.Reactor):
# ignore the first word, a nick, if the speaker is the bridge # ignore the first word, a nick, if the speaker is the bridge
try: try:
channel = IrcChannel.objects.get(name=sent_location) channel = IrcChannel.objects.get(server=connection.server_config, name=sent_location)
if sender_nick == channel.discord_bridge: if sender_nick == channel.discord_bridge:
short_what = ' '.join(what.split(' ')[1:]) short_what = ' '.join(what.split(' ')[1:])
match = re.match(addressed_pattern, short_what, re.IGNORECASE) match = re.match(addressed_pattern, short_what, re.IGNORECASE)

View File

@ -224,6 +224,8 @@ wheel==0.38.4
# via # via
# pip-tools # pip-tools
# tox-wheel # tox-wheel
whitenoise==6.7.0
# via -r requirements/requirements.in
zalgo-text==0.6 zalgo-text==0.6
# via -r requirements/requirements.in # via -r requirements/requirements.in

View File

@ -9,4 +9,5 @@ ply # dice lex/yacc compiler
python-dateutil # countdown relative math python-dateutil # countdown relative math
python-mpd2 # client for mpd python-mpd2 # client for mpd
pytz # timezone awareness pytz # timezone awareness
whitenoise # easier static files
zalgo-text # zalgoify text zalgo-text # zalgoify text

View File

@ -78,5 +78,7 @@ tempora==5.2.1
# jaraco-logging # jaraco-logging
typing-extensions==4.5.0 typing-extensions==4.5.0
# via pydantic # via pydantic
whitenoise==6.7.0
# via -r requirements/requirements.in
zalgo-text==0.6 zalgo-text==0.6
# via -r requirements/requirements.in # via -r requirements/requirements.in