Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update PyConTW 2023 to 2024(BackEnd) #1155

Merged
merged 7 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: "3.5"
services:
web:
build: .
container_name: pycontw-2023
hostname: pycontw-2023
container_name: pycontw-2024
hostname: pycontw-2024
entrypoint: ""
command:
# Hacky script for quick demonstration purpose
Expand All @@ -26,7 +26,7 @@ services:
restart: always
environment:
# Save us from having to type `--setting=pycontw2016.settings.production`
DJANGO_SETTINGS_MODULE: pycontw2016.settings.production.pycontw2023
DJANGO_SETTINGS_MODULE: pycontw2016.settings.production.pycontw2024
SCRIPT_NAME: /prs
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: ${DATABASE_URL}
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -43,4 +43,4 @@ services:
networks:
network:
external: true
name: network-2023
name: network-2024
9 changes: 5 additions & 4 deletions src/pycontw2016/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,10 @@ def node_bin(name):
('pycontw-2021', _('PyCon Taiwan 2021')),
('pycontw-2022', _('PyCon Taiwan 2022')),
('pycontw-2023', _('PyCon Taiwan 2023')),
('pycontw-2024', _('PyCon Taiwan 2024')),
]

CONFERENCE_DEFAULT_SLUG = 'pycontw-2023'
CONFERENCE_DEFAULT_SLUG = 'pycontw-2024'
TEMPLATES[0]['DIRS'][1] = os.path.join(
BASE_DIR, 'templates', CONFERENCE_DEFAULT_SLUG,
)
Expand All @@ -324,13 +325,13 @@ def node_bin(name):
)

EVENTS_DAY_NAMES = collections.OrderedDict([
(datetime.date(2023, 9, 2), _('Day 1')),
(datetime.date(2023, 9, 3), _('Day 2')),
(datetime.date(2024, 9, 2), _('Day 1')),
(datetime.date(2024, 9, 3), _('Day 2')),
SivanYeh marked this conversation as resolved.
Show resolved Hide resolved
])

SCHEDULE_REDIRECT_URL = None

COC_VERSION = '2023.0'
COC_VERSION = '2024.0'

# Since 2021, pycon.tw has indivisual server hosting the attendee-facing pages
# (see the repo at https://github.com/pycontw/pycontw-2021) and this config
Expand Down
27 changes: 27 additions & 0 deletions src/pycontw2016/settings/production/pycontw2024.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from django.utils.translation import gettext_lazy as _
from .base import BASE_DIR, STATICFILES_DIRS, TEMPLATES
from .base import * # noqa

# Override static and media URL for prefix in WSGI server.
# https://code.djangoproject.com/ticket/25598
STATIC_URL = '/prs/static/'
MEDIA_URL = '/prs/media/'

CONFERENCE_DEFAULT_SLUG = 'pycontw-2024'

TALK_PROPOSAL_DURATION_CHOICES = (
('NOPREF', _('No preference')),
('PREF15', _('Prefer 15min')),
('PREF30', _('Prefer 30min')),
('PREF45', _('Prefer 45min')),
)

TEMPLATES[0]['DIRS'][1] = os.path.join(
BASE_DIR, 'templates', CONFERENCE_DEFAULT_SLUG,
)
STATICFILES_DIRS[1] = os.path.join(
BASE_DIR, 'static', CONFERENCE_DEFAULT_SLUG, '_includes',
)

FRONTEND_HOST = 'https://tw.pycon.org/2024'
22 changes: 22 additions & 0 deletions src/pycontw2016/settings/testing/pycontw2024.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os

from django.utils.translation import gettext_lazy as _
from .base import BASE_DIR, STATICFILES_DIRS, TEMPLATES
from .base import * # noqa


CONFERENCE_DEFAULT_SLUG = 'pycontw-2023'
SivanYeh marked this conversation as resolved.
Show resolved Hide resolved

TALK_PROPOSAL_DURATION_CHOICES = (
('NOPREF', _('No preference')),
('PREF15', _('Prefer 15min')),
('PREF30', _('Prefer 30min')),
('PREF45', _('Prefer 45min')),
)

TEMPLATES[0]['DIRS'][1] = os.path.join(BASE_DIR, 'templates', 'pycontw-2024')
STATICFILES_DIRS[1] = os.path.join(
BASE_DIR, 'static', CONFERENCE_DEFAULT_SLUG, '_includes',
)

EVENTS_PUBLISHED = False
Loading