Posts
Q&A
run_test_hello_channel.py ์คํ no module named 'channel_redis' ์ค๋ฅ ๋ฐ์
๋น ๋ฅด๊ฒ ๋ต๋ณํด์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค!๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๊ฒ์ํด๋ณด๋ ์ค์น๊ฐ ๋์ด์๋ ๊ฒ์ผ๋ก ๋์ต๋๋ค ใ ใ (webchat) tk_mac@itaegyeong-ui-MacBookAir webchat % python -m pip list Package Version------------------ ---------asgiref 3.6.0async-timeout 4.0.2attrs 22.2.0autobahn 23.1.2Automat 22.10.0beautifulsoup4 4.11.2certifi 2022.12.7cffi 1.15.1channels 4.0.0channels-redis 4.0.0charset-normalizer 3.1.0constantly 15.1.0cryptography 39.0.2daphne 4.0.0Django 4.1.7django-bootstrap5 22.2django-environ 0.10.0exceptiongroup 1.1.0hyperlink 21.0.0idna 3.4incremental 22.10.0iniconfig 2.0.0msgpack 1.0.4packaging 23.0pip 22.3.1pluggy 1.0.0pyasn1 0.4.8pyasn1-modules 0.2.8pycparser 2.21pyOpenSSL 23.0.0pytest 7.2.2pytest-asyncio 0.20.3pytest-django 4.5.2pytest-testdox 3.0.1redis 4.5.1requests 2.28.2service-identity 21.1.0setuptools 65.6.3six 1.16.0soupsieve 2.4sqlparse 0.4.3tomli 2.0.1Twisted 22.10.0txaio 23.1.1typing_extensions 4.5.0urllib3 1.26.14wheel 0.38.4zope.interface 5.5.2
- 0
- 2
- 585
Q&A
"๋"์ ์ ๋ ฅํ๋ฉด ์๋ฌ๊ฐ ๋ฐ์ํ์ฌ ์ง๋ฌธ๋๋ฆฝ๋๋ค.
๋ฐ๋ณต๋ฌธ ์ ์กฐ๊ฑด๋ฌธ์์ ์ ์์๋ก ์์๋๋ if๋ฌธ์์ ์ค๋ฅ๊ฐ ๋๋ ๊ฒ ๊ฐ์ต๋๋ค. ์์ฑํ์ ๊ฒ๊ณผ ๊ฐ์ด if int(price) > 0: ๊ฐ ์์ผ๋ก ์ค๊ณ elif price == "๋": ๊ฐ ๋ค๋ก์ค๊ฒ ๋๋ฉด ์ฐ์ ์ ์ผ๋ก int(price) > 0์ ๋จผ์ ํ๋จํ๊ฒ ๋ฉ๋๋ค. ์ด๋ ์ซ์๋ฅผ ์ ๋ ฅํ ๋๋ ์ด์์ด ์์ง๋ง ๋ฌธ์์ด์ ์ ๋ ฅ๋ฐ๊ฒ ๋๋ฉด ๋ฌธ์์ด"๋"์ธ price๋ฅผ int๊ฐ์ผ๋ก ๋ณํ์ํฌ ์ ์๊ธฐ ๋๋ฌธ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๊ฒ ๋ฉ๋๋ค. ์ด๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด์ if price == "๋": elif int(price) > 0: ๋ก ๋ณ๊ฒฝํ์ฌ ๋์ด ์ฌ๋๋ฅผ ๋จผ์ ํ๋จํ๊ฒ ํด์ฃผ๋ฉด ์ ๋๋ก ์คํ๋๊ฒ ๋ฉ๋๋ค.
- 0
- 3
- 337