Open
Conversation
uranusjr
requested changes
May 5, 2018
|
|
||
| ``` | ||
| 輸入帳號、Email、密碼等資訊,就完成 superuser 的新增了。 | ||
| 輸入帳號、Email、密碼(必須超過八個字元)等資訊,就完成 superuser 的新增了。 |
| --- | ||
|
|
||
| Django 通常以 `Post object` 來表示 Post 物件,但此種顯示不易辨別。我們可以透過 [`def __str__`](https://docs.djangoproject.com/en/1.8/ref/models/instances/#str) 更改 Post 的表示方式。 | ||
| Django 通常以 `Post object` 來表示 Post 物件,但此種顯示不易辨別。我們可以透過 [`def __str__`](https://docs.djangoproject.com/en/2.0/ref/models/instances/#str) 更改 Post 的表示方式。 |
Member
There was a problem hiding this comment.
Django 通常以
Post object來表示 Post 物件
雖然之前就是這樣寫了,不過「通常」是什麼意思 XD 應該是說「預設」?
| urlpatterns = [ | ||
| ... | ||
| url(r'^post/(?P<pk>\d+)/$', post_detail, name='post_detail'), | ||
| path('post/<int:pk>/', views.detail, name='detail'), |
|
|
||
| ### 開始安裝 | ||
|
|
||
| Python 3.4 預先安裝了 `pip` 這個強大的套件管理工具,我們將使用它來安裝 Django: |
Contributor
Author
There was a problem hiding this comment.
這個之前就有了啦,pip 真的是 3.4 之後才有的啊
Member
There was a problem hiding this comment.
可是現在還在說 3.4 不覺得很多餘嗎,就說「Python 現在預先安裝了」就好
Contributor
Author
There was a problem hiding this comment.
因為無法確定看 Gitbook 的人 Python 的版本,想說這邊至少說清楚 3.4 才有 pip。
Member
There was a problem hiding this comment.
等等 Django 2.0 根本就不支援 3.4 以前的版本啊,如果是用沒有 pip 的 Python 從教材第一頁就應該要出局了?
|
|
||
| ``` | ||
| (djangogirls_venv) ~/djangogirls$ pip install "django<1.9" | ||
| (djangogirls_venv) ~/djangogirls$ pip install django |
Member
There was a problem hiding this comment.
現在可以用 pip install django~=2.0 表示安裝 2.0.x 系列,我覺得還滿清楚,也同時保證 2.1 出了之後不會把上需要檢查哪裡壞掉
| { | ||
| 'post_list': post_list, | ||
| } | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
這教練會當天確定一下格式好了~不只這個地方。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
先不要按 Merge
Changes and questions:
https://paper.dropbox.com/doc/Django-Girls-DSsN1hxr4mjwRaQQJCWSp