Skip to content

Commit

Permalink
feat: update PyConTW 2023 to 2024(BackEnd)
Browse files Browse the repository at this point in the history
feat: update PyConTW 2023 to 2024(BackEnd)

Update base.html from 2023 to 2024

Co-authored-by: Wei-Hsiang (Matt) Wang <[email protected]>

Update src/templates/pycontw-2024/contents/_base.html

Co-authored-by: Wei-Hsiang (Matt) Wang <[email protected]>

fix(migration): add migration scripts

fix(assest): fix logo path

fix(docker): update uwsgi mount path

fix: dockerfile

fix node_modules path for production dockerfile

feat: update code-of-conduct 2024 version

Update code-of-conduct.html

Differences compare to the provided doc

update en-coc effective date

2023->2024/02/20

Apply suggestions from code review

Co-authored-by: Sivan <[email protected]>

feat: add procedure image in CoC

adjustment_from_staging_2024-migrate

adjust allowed_host

switch back .python-version to 3.6.8

adjust_conference_date_to_2024

update date in 2023 to 2024

Update django.po

fix typo

apply makemigrations and makemessages

auto result after two cmd:
$python manage.py makemigrations

$python manage.py makemessages -l en_US -l zh_Hant

remove prefer_time

remove prefer_time from src/core/choices.py and src/core/models.py then executed the following:
$ python manage.py makemigrations
$python manage.py makemessages -l en_US -l zh_Hant

remove prefer_time in tests

remove prefer_time in messages
  • Loading branch information
SivanYeh authored and josix committed Apr 5, 2024
1 parent 4bdb64d commit 58f179e
Show file tree
Hide file tree
Showing 228 changed files with 16,272 additions and 134 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ RUN yarn install --dev --frozen-lockfile \
# [Python Stage for Django web server]
FROM python:3.6-slim-buster as python_stage

COPY --from=node_stage /node_modules /usr/local/lib/node_modules
COPY --from=node_stage /usr/local/bin/node /usr/local/bin/node

ENV PYTHONUNBUFFERED 1
ENV BASE_DIR /usr/local
ENV APP_DIR $BASE_DIR/app

COPY --from=node_stage /node_modules $APP_DIR/node_modules
COPY --from=node_stage /usr/local/bin/node /usr/local/bin/node

# make nodejs accessible and executable globally
ENV NODE_PATH /usr/local/lib/node_modules/
ENV NODE_PATH $APP_DIR/node_modules/
ENV PATH /usr/local/bin:$PATH

# Add bin directory used by `pip install --user`
Expand Down Expand Up @@ -53,5 +53,5 @@ EXPOSE 8000
CMD ["uwsgi", "--http-socket", ":8000", "--master", \
"--hook-master-start", "unix_signal:15 gracefully_kill_them_all", \
"--static-map", "/static=assets", "--static-map", "/media=media", \
"--mount", "/2021=pycontw2016/wsgi.py", "--manage-script-name", \
"--mount", "/2024=pycontw2016/wsgi.py", "--manage-script-name", \
"--offload-threads", "2"]
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}
Expand All @@ -43,4 +43,4 @@ services:
networks:
network:
external: true
name: network-2023
name: network-2024
7 changes: 0 additions & 7 deletions src/core/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
('EXPERIENCED', _('Experienced')),
)

PREFER_TIME_CHOICES = (
('DAY_ONE_MORNING', _('Day 1, September 2nd, 2023 Morning')),
('DAY_ONE_AFTERNOON', _('Day 1, September 2nd, 2023 Afternoon')),
('DAY_TWO_MORNING', _('Day 2, September 3rd, 2023 Morning')),
('DAY_TWO_AFTERNOON', _('Day 2, September 3rd, 2023 Afternoon')),
)

RECORDING_POLICY_CHOICES = (
(True, _('Yes')),
(False, _('No'))
Expand Down
7 changes: 0 additions & 7 deletions src/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
CATEGORY_CHOICES,
LANGUAGE_CHOICES,
PYTHON_LVL_CHOICES,
PREFER_TIME_CHOICES,
RECORDING_POLICY_CHOICES,
LIVING_IN_TAIWAN_CHOICES,
LIVE_STREAM_POLICY_CHOICES,
Expand Down Expand Up @@ -170,12 +169,6 @@ class EventInfo(models.Model):
auto_now=True,
)

prefer_time = models.CharField(
verbose_name=_('prefer event time'),
max_length=32,
choices=PREFER_TIME_CHOICES,
)

living_in_taiwan = models.BooleanField(
verbose_name=_('living in Taiwan'),
default=False,
Expand Down
54 changes: 54 additions & 0 deletions src/events/migrations/0050_auto_20240127_1104.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Generated by Django 3.1.7 on 2024-01-27 03:04

from django.db import migrations, models
import events.models


class Migration(migrations.Migration):

dependencies = [
('events', '0049_rename_willing_to'),
]

operations = [
migrations.AlterField(
model_name='customevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='joblistingsevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='keynoteevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='keynoteevent',
name='speaker_photo',
field=models.ImageField(default='', help_text="Raster format of the speaker's photo, e.g. PNG, JPEG.", storage=events.models.select_storage, upload_to=events.models.photo_upload_to, verbose_name='speaker photo'),
),
migrations.AlterField(
model_name='proposedtalkevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='proposedtutorialevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='schedule',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
migrations.AlterField(
model_name='sponsoredevent',
name='conference',
field=models.SlugField(choices=[('pycontw-2016', 'PyCon Taiwan 2016'), ('pycontw-2017', 'PyCon Taiwan 2017'), ('pycontw-2018', 'PyCon Taiwan 2018'), ('pycontw-2019', 'PyCon Taiwan 2019'), ('pycontw-2020', 'PyCon Taiwan 2020'), ('pycontw-2021', 'PyCon Taiwan 2021'), ('pycontw-2022', 'PyCon Taiwan 2022'), ('pycontw-2023', 'PyCon Taiwan 2023'), ('pycontw-2024', 'PyCon Taiwan 2024')], default='pycontw-2024', verbose_name='conference'),
),
]
18 changes: 18 additions & 0 deletions src/events/migrations/0051_auto_20240221_1514.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.7 on 2024-02-21 07:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('events', '0050_auto_20240127_1104'),
]

operations = [
migrations.AlterField(
model_name='sponsoredevent',
name='prefer_time',
field=models.CharField(choices=[('DAY_ONE_MORNING', 'Day 1, September 21st, 2024 Morning'), ('DAY_ONE_AFTERNOON', 'Day 1, September 21st, 2024 Afternoon'), ('DAY_TWO_MORNING', 'Day 2, September 22nd, 2024 Morning'), ('DAY_TWO_AFTERNOON', 'Day 2, September 22nd, 2024 Afternoon')], max_length=32, verbose_name='prefer event time'),
),
]
17 changes: 17 additions & 0 deletions src/events/migrations/0052_remove_sponsoredevent_prefer_time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1.7 on 2024-02-24 02:20

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('events', '0051_auto_20240221_1514'),
]

operations = [
migrations.RemoveField(
model_name='sponsoredevent',
name='prefer_time',
),
]
Loading

0 comments on commit 58f179e

Please sign in to comment.