-
Notifications
You must be signed in to change notification settings - Fork 112
Feature/location #1254
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
Feature/location #1254
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Generated by Django 3.2.25 on 2025-07-07 15:27 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('events', '0054_auto_20250517_1525'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='customevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='joblistingsevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='keynoteevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='proposedtalkevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='proposedtutorialevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='sponsoredevent', | ||
| name='location', | ||
| field=models.CharField(blank=True, choices=[('4-r0', 'R0'), ('5-r1', 'R1'), ('6-r2', 'R2'), ('1-r3', 'R3'), ('7-r4', 'R4'), ('81-spt-os', 'Sprint / Open Space'), ('82-tutorial', 'Tutorial'), ('83-yi-ps', 'Young Inspire / Poster Session')], db_index=True, max_length=12, null=True, verbose_name='location'), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,29 +116,34 @@ class Location: | |
| R2_2 = '6-r2-2' | ||
| R4 = '7-r4' | ||
| OTHER = '8-oth' | ||
| SPT_OS = '81-spt-os' # sprint / open space | ||
| TUTORIAL = '82-tutorial' # tutorial | ||
| YI_PS = '83-yi-ps' # young inspire / poster session | ||
|
Comment on lines
+119
to
+121
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 過去都是用 location 名稱 (會議室編號) 來作為選項,為何這裡會用活動名稱作為選項?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 是 今天的scedule變動比較大,然後這些都要單獨一個一軌,名稱就是location,然後給議程組設定活動
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 前端對於活動地點的資訊會如何呈現呢?有設計稿或者任何文字說明嗎?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
我覺得這樣就是會產生這個問題XD
有更多說明嗎(什麼意思、預期怎麼實作)?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 會把一個活動 EX: tutorial 標記為是在「tutorial」這個地點舉辦。是當初PM跟我們說的 目前每個活動時長不一、可以有彈性,slot 不再強制對齊 (schedule 頁面上 slot 長度大致與活動時長成正比) 會像是google calender 一樣,時間多長就佔多長的bolck 跟位置 這兩個都是今年新需求
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 但是 google calendar 是完全的 slot 長度與活動時長成正比,過去的 schedule 頁面也是時間比較長就會有顯示比較長的 slot (只是 DB 的 "Time" table 就要塞好每個時間點),所以我看不出你描述的差異是什麼?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我們有discord 回覆>< |
||
|
|
||
|
|
||
| class BaseEvent(ConferenceRelated): | ||
| """Base interface for all events in the schedule. | ||
| """ | ||
| LOCATION_CHOICES = [ | ||
| (Location.ALL, _('All rooms')), | ||
| (Location.R012, _('R0, R1, R2')), | ||
| # (Location.ALL, _('All rooms')), | ||
| # (Location.R012, _('R0, R1, R2')), | ||
| (Location.R0, _('R0')), | ||
| (Location.R0_1, _('R0_1')), | ||
| (Location.R0_2, _('R0_2')), | ||
| # (Location.R0_1, _('R0_1')), | ||
| # (Location.R0_2, _('R0_2')), | ||
| (Location.R1, _('R1')), | ||
| (Location.R1_1, _('R1_1')), | ||
| (Location.R1_2, _('R1_2')), | ||
| # (Location.R1_1, _('R1_1')), | ||
| # (Location.R1_2, _('R1_2')), | ||
| (Location.R2, _('R2')), | ||
| (Location.R2_1, _('R2_1')), | ||
| (Location.R2_2, _('R2_2')), | ||
| # (Location.R2_1, _('R2_1')), | ||
| # (Location.R2_2, _('R2_2')), | ||
| (Location.R3, _('R3')), | ||
| (Location.R4, _('Open Space')), | ||
| (Location.OTHER, _('Other')), | ||
| (Location.R4, _('R4')), | ||
| (Location.SPT_OS , _('Sprint / Open Space')), | ||
| (Location.TUTORIAL, _('Tutorial')), | ||
| (Location.YI_PS, _('Young Inspire / Poster Session')), | ||
| ] | ||
| location = models.CharField( | ||
| max_length=6, | ||
| max_length=12, | ||
| choices=LOCATION_CHOICES, | ||
| blank=True, | ||
| null=True, | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test cases?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這東西當初沒有溝通好,所以又是一張這兩天必須完成的票
議程組還要上去打議程資訊
所以測試我請他之後補
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這個 EventWrapper 本來就還沒有測試
https://app.codecov.io/gh/pycontw/pycon.tw/pull/1254/blob/src/events/api/views.py#L142