Skip to content
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

Django 2.0 #12

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Django 2.0 #12

wants to merge 8 commits into from

Conversation

flywindy
Copy link
Contributor

@flywindy flywindy commented May 5, 2018

先不要按 Merge

Changes and questions:
https://paper.dropbox.com/doc/Django-Girls-DSsN1hxr4mjwRaQQJCWSp

@flywindy flywindy changed the base branch from develop to master May 5, 2018 08:51
django/admin.md Outdated
@@ -54,7 +54,7 @@ Password (again):
Superuser created successfully.

```
輸入帳號、Email、密碼等資訊,就完成 superuser 的新增了。
輸入帳號、Email、密碼(必須超過八個字元)等資訊,就完成 superuser 的新增了。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

限制不只這個,不如說「長一點,不要太簡單」?

django/admin.md Outdated
@@ -101,7 +99,7 @@ admin.site.register(Post)

---

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 的表示方式。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Django 通常以 Post object 來表示 Post 物件

雖然之前就是這樣寫了,不過「通常」是什麼意思 XD 應該是說「預設」?

@@ -52,33 +51,29 @@ from trips.views import hello_world, home, post_detail

urlpatterns = [
...
url(r'^post/(?P<pk>\d+)/$', post_detail, name='post_detail'),
path('post/<int:pk>/', views.detail, name='detail'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟上面的 import 不符。detail 這名稱太爛⋯⋯

@@ -82,44 +82,33 @@ Linux 或 OS X 需要使用 `python3` 來建立虛擬環境,指令如下:
(djangogirls_venv) ~/djangogirls$


## 安裝 Django 1.8 最新版本
## 安裝 Django 2.0 最新版本

### 開始安裝

Python 3.4 預先安裝了 `pip` 這個強大的套件管理工具,我們將使用它來安裝 Django:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡的 3.4 很多餘

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個之前就有了啦,pip 真的是 3.4 之後才有的啊

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可是現在還在說 3.4 不覺得很多餘嗎,就說「Python 現在預先安裝了」就好

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因為無法確定看 Gitbook 的人 Python 的版本,想說這邊至少說清楚 3.4 才有 pip。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

等等 Django 2.0 根本就不支援 3.4 以前的版本啊,如果是用沒有 pip 的 Python 從教材第一頁就應該要出局了?


### 開始安裝

Python 3.4 預先安裝了 `pip` 這個強大的套件管理工具,我們將使用它來安裝 Django:

```
(djangogirls_venv) ~/djangogirls$ pip install "django<1.9"
(djangogirls_venv) ~/djangogirls$ pip install django
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現在可以用 pip install django~=2.0 表示安裝 2.0.x 系列,我覺得還滿清楚,也同時保證 2.1 出了之後不會把上需要檢查哪裡壞掉

{
'post_list': post_list,
}
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我好討厭這個縮排

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那你提供一個你喜歡的

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就本來那個?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這教練會當天確定一下格式好了~不只這個地方。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants