1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

django girls tutorial をやってみた

Last updated at Posted at 2018-07-23

progateの次は色々作りながら学んでいこうと考えていたところ、ちょうどgirls tutorial というサイトを見つけたのでやってみました。
このページでは自分がつまずいたところをメモしておきます。

1 特定のurlに対して、対象を指定する時
#path関数を使って、warningのようなエラー
path→re_pathに変更
(そうすると、url指定する部分 引数?に正規表現を使える)
ただ、ここでpathやre_pathを使っても、htmlファイルに組み込む時には({% %}と書く時)、urlと書く。
(tutorialではurlという関数を使っていたのですが、pathまたはre_pathという関数がよく使われるらしいのでこちらを使った。基本的に問題なかったが、上記に部分は気をつけて!)

2 gitigmoreが反映されない時
# unapplied migration みたいなエラー
中身を確認(自分はsettings.pyをsetingと書いてた汗)

3 iconが出ない時
#エラーは出ないけど、アイコンが表示されない
tutorialではflybiconを使っていたが、今はfontawesomeというものに変わっている。
公式サイトからlinkをコピーして、htmlファイルに貼る
fa-fa に変更

4 追記 __ に気をつける
pythonでは __ (アンダーバー2つ)をよく使う(らしい)ので、要チェック

かかった時間 12時間ほど(3日)

django girls tutorial
https://djangogirlsjapan.gitbooks.io/workshop_tutorialjp/

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?