Closed SivanYeh closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
913fef7
) 70.59% compared to head (b674918
) 70.59%. Report is 9 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It’s twenty-first and twenty-second, i.e. 21st and 22nd, not 21th and 22th.
It’s twenty-first and twenty-second, i.e. 21st and 22nd, not 21th and 22th.
Thanks a lot! Shame of my tuition.
我是參考deploy_local_env_dev.md進行中
有檢查過有沒有新的 migration scripts 嗎?(指令為
python manage.py makemigrations
)
這是現在在debug的地方. 執行完後會出現這段錯誤訊息:
(venv) ➜ src git:(adjust_conference_date_to_2024) ✗ python manage.py makemigrations
Traceback (most recent call last):
File "root/pycon.tw/src/manage.py", line 16, in <module>
execute_from_command_line(sys.argv)
File "root/pycon.tw/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "root/pycon.tw/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/Users/hsin-yunyeh/miniforge_x86_64/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "root/pycon.tw/src/pycontw2016/settings/local.py", line 1, in <module>
from .base import (
File "root/pycon.tw/src/pycontw2016/settings/base.py", line 15, in <module>
import environ
File "root/pycon.tw/venv/lib/python3.9/site-packages/environ.py", line 114
raise ValueError, "No frame marked with %s." % fname
^
SyntaxError: invalid syntax
- 或者知道為何要做 DB migrations 嗎?
知道要更新2023 db->2024 db使資訊取用為2024版本; 不過沒有連結到這層, 並以為db migration做完, 只是db裡部分資料尚未更新.
- po 檔的原文變更是可以自動產出的(指令為
python manage.py makemessages -l en_US -l zh_Hant
),看起來只有(手動)修改英文的 po 檔案但沒有改到中文的 po
我就知道有自動化的方式!
所以理想來說是以這樣的方式變更? Josix comments
To update fields in models: You can alter fields in your model by making changes to the relevant model file (e.g., models.py).
變更core/choices.py
Create a migration: After making changes to your model, you need to create a new migration file. This can be done using the makemigrations command, like python manage.py makemigrations. This will generate a new migration file based on the changes you made to your model.
$ python manage.py makemigrations
這是現在在debug的地方
我們現在用的 python 是很舊的 3.6 版本,你用的是 3.9,可能是因此而有語法上的差異
這是現在在debug的地方
我們現在用的 python 是很舊的 3.6 版本,你用的是 3.9,可能是因此而有語法上的差異
尚未解決. 不過更新下新發現: local env: OS: macOS v11.4 chip: Apple M1
macOS v11無法使用3.6.14之前的版本. 於是用3.6.15來跑. 不過以pip install安裝套件的過程中會遇到Pillow安裝不順的問題:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py", line 914, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Rolling back uninstall of Pillow
Moving to usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/PIL/
from usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/~IL
Moving to usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/Pillow-8.4.0-py3.6.egg-info
from usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/~illow-8.4.0-py3.6.egg-info
ERROR: Command errored out with exit status 1: usr/.pyenv/versions/3.6.15/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py'"'"'; __file__='"'"'/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-record-yyoafwjz/install-record.txt --single-version-externally-managed --compile --install-headers usr/.pyenv/versions/3.6.15/include/python3.6m/Pillow Check the logs for full command output.
執行$python manage makemigrations, 會出現
from typing import Literal, Union
ImportError: cannot import name 'Literal'
參考自stack overflow, 這可能是3.8前的版本會遇到的錯誤
update date in 2023 to 2024
Types of changes
Description
Describe what the change is Current options are outdated in proposal system. latest conference dates have to be updated to Day1: 2024/9/21 Day2: 2024/9/22
screenshot:![image](https://github.com/pycontw/pycon.tw/assets/26858727/7079656f-ebd1-4fd9-83f3-e83b5b6cfb11)
Related Issue
1163
More Information
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Refer to: https://github.com/pycontw/pycon.tw/pull/1120