twtrubiks

Results 57 comments of twtrubiks

試試看 runtime.txt 改 3.6.2 然後可以再提供多一點資訊嘛?

I don't know much about what you mean. If you want to have two same items in different sizes, there is a different item name.

我沒串過這家金流,你可能要自己研究一下

can be deal with from here [cart.py](https://github.com/twtrubiks/django-shop-tutorial/blob/master/cart/cart.py)

@zoearthmoon Hi,這個已經很久了,有點忘了,但我肯定的是 django 安裝小於 2.0 以下的版本是肯定的(django

hi @Aiooon 我從你的截圖看,db.sqlite3在你的路徑 django-tutorial/db.sqlite3 1.使用pycharm查看資料庫 你沒辦法從 pycharm 看db,應該只是因為你沒有 driver (download missing driver files) 安裝完後(點你截圖上的 download ),應該就可以使用了。 2.使用 [sqlitebrowser](http://sqlitebrowser.org/) 觀看資料庫 下載後,將你的 db.sqlite3 用 sqlitebrowser 開啟即可。

@ekils 當然可以刪除。 修改superuser的密碼 ```cmd python manage.py changepassword *username* ``` 官方文件 [Changing passwords](https://docs.djangoproject.com/en/2.0/topics/auth/default/#changing-passwords)

因為 docker 可以透過容器的 service 連線到對應的 db, 我這邊剛好定義為 "db". 可參考 https://github.com/twtrubiks/docker-tutorial#user-defined-networks 透過內建的 DNS 伺服器,可以直接使用容器名稱,就可解析出 IP,不需要再使用 IP 讓容器互相 溝通,我們只需要知道容器的名稱就可以連接到容器。

我在 https://github.com/twtrubiks/docker-swarm-tutorial/blob/master/docker-swarm-secrets/api/django_rest_framework_tutorial/settings.py 這邊也是直接填入容器的名稱 (db). ```python DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', 'PASSWORD': secret('my_password'), 'HOST': 'db', 'PORT': 5432, } } ``` 不知道你問的是不是這個? 假如你有很多db, 理論上應該也會透過一些方法同步每一顆的db, 所以應該隨便拿一顆(應該 host...

@sunaley 謝謝提供方法,這個之前我也有看到,不過就要自己額外寫 .sh ,有機會我會嘗試看看,謝謝。