Madoka
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: ワークショップ 2019 インストールパーティスタッフ共有事項 tags: DjangoGirls image: https://i.imgur.com/5W3pdV5.png --- # Coaches Meetup 2019 ==このノートは、Coaches Meetup 2019で議論されたことをまとめたものです== ## Pythonのインストール **方針** - 3.8はインストールしない。 - 3.7をインストール。(Pythonが入っていないPC) - 3.6がすでに入っている人は、そのまま3.6をつかってもOK - Python.orgからインストール。GUIの方が、参加者にとってわかりやすい。 --- Python 3.7.5 (10/15更新) https://www.python.org/downloads/release/python-375/ Python 3.6.9 https://www.python.org/downloads/release/python-369/ --- 例えば、Python3.7を入れる際に、すでにインストールされているPythonのアンインストールは不要。すでにPython3.4が入っている場合、`python3.4`と`python3.7`が使えるようになる。 `python3.7 -m venv myvenv`(nikkie) - [どのバージョンの Python で Django が使えますか?](https://docs.djangoproject.com/ja/2.2/faq/install/#what-python-version-can-i-use-with-django) -> Django 2.2ではPython3.6, 3.7が使える - すでにPythonが入っている人への対応は「上で決めたPythonのバージョンまでアップデート」でいいですか? - Linux系のコマンドだと、aptやyumなどのパッケージマネージャでインストールしていますが、Win, Mac系だとバイナリファイルを公式サイトからダウンロードする手順になっています。それであれば、Macもhomebrewなどのパッケージ管理ツールでPythonインストールするのもアリかな(要はどっちかに統一させたい)と思ったのですがいかがでしょうか?(Win系はそういうのあるのかな?)(himrock922) - windowsではMicrosoft Storeからインストールできます。(take)  - しっかり環境を構築したい人、チャレンジしたい人もいるのではないか。 - binからのインストールや、git, conda等のサポートはしなくていいのか? → 後から見直せるようにgirlsのtutorialに沿ったほうが望ましいのでは? との意見も → 12月にフォローアップがあるので、さらに踏み込んでやりたい人はそっちを紹介するとか。 **※ 対象は黒い画面を触ったことがない人** **connpassすら触ったことがないような人を拾い上げたい** - 参加者が何やったか、あとから復習できるようにチュートリアルに沿ったほうがよいのではないか。 - (Pythonのインストール)パッケージ管理マネージャで Python をインストールする場合は、パッケージリストを更新してからインストールをした方がよさそう(apt update)。インストール時に内部で自動的にリスト更新されるかもしれないけど、明示的にアップデートを実行しておいた方が安心と思いました。(Yuki) - 想定シナリオ:会社のPCを持ってきた、家族のPCを持ってきた、Pythonが入れられない。 - 権限がない、セキュリティかかってる。 - 「Chromebookのセットアップ」を参考にして、PaizaCloudを使う。 - PaizaCloud のほうが、AWSCloud9よりオススメ。 - 早速pizaCloudでDjango環境構築を試してみましたが仮想環境回りで動きがおかしなことになっています(shinya) ``` $ sudo apt install python3 $ mkdir djangogirls $ cd djangogirls $ sudo apt-get install python3-venv $ python3.6 -m venv myvenv $ source myenv/bin/activate $ python3.6 -m pip install --upgrade pip ``` PaizaCloudではDjangoがもともと入っているようなので仮想環境は不要(非対応)みたいです(nikkie) いきなり`startproject`できる: https://proxy-paiza-hatenablog-com.paiza.cloud/entry/2018/02/28/paizacloud_django ## コードエディタ **方針:** - 手になじんでいるエディタがあれば、それを使ってもらう。 - おすすめするエディタ(新しくインストールする場合)は、ひとまずAtomを推奨する。はじめての方が使ってシンプルさがよい。 - 開発終了については気にしない。VSCodeと全く同じなので開発が止まったということで、セキュリティに不安はないと考えられる - コーチの馴染みのあるエディタでもよいが、しっかりフォローはしよう。プラグインのインストールがポップアップしてくるなど、初心者にはわかりづらい。 --- - この前,windows 7の方がおられました。そうすると、現在のコードエディタ(Atom,VSCode等)をインストール、起動する際に .NET Frameworkのバージョンが古くてエディタをインストールできない場合がありました。そういう場合は.NET Frameworkを最新版にアップグレードする作業が必要。windows 7でも大丈夫でした。 ## Djangoのインストール ### 仮想環境 **方針:** - 基本的にはanacondaの場合はvenvを案内する - anacondaの人は一部なので、質問が来てわからなければ、nikkieさんへヘルプを。 --- - Requirementsのバージョン指定方法って普段Django==2.2.4のようにしていた。Django~=2.2.4は始めてみた(shinya) - Django2.2系の最新が入るように指定する表記です([ref](https://www.python.org/dev/peps/pep-0440/#compatible-release))。バグフィックスは取り込みたいという意図だと思います(nikkie) - 「2.2.4入れたのに2.2.6って表示されているんですけど?」という質問が飛んでくるかもしれないので留意する。 - **とりあえずAnaconda入れた**という方や**仕事でAnaconda使ってる**人含め、**Anacondaユーザーにはcondaでライブラリ管理**してもらいますか?一応まとめてみたところ、仮想環境の構築、ライブラリのインストール以外は問題なさそうです - 私見なのですが、Workshopの運営であれば、Anacondaでもvenvの案内でいいと思っています。メリット:Anacondaだけ例外対応しなくていい / デメリット:venvだとcondaが管理している科学計算系パッケージは使えない(が、参加者にとっては重要ではなさそう)。venv作成でエラーとなり、`conda update conda`しても解決しない場合のみ`conda create`を想定しています(nikkie) - requirements.txt作成 `$ pip install -r requirements.txt`を実行後`/home/ubuntu/djangogirls/myvenv/lib/python3.6/site-packages`配下にdjangoがインストールされる想定だが、`/usr/local/lib/python3.6/dist-packages/django`にインストールされてしまう。 Terminal上には(myvenv)と表示されているので、見た目上は仮想環境のアクティベートができているが`pip install`すると/myvenv/配下ではなく/usr/local側に入ってしまう状況・・・ 色々試していますが解決策が見つからず。 仮想環境を利用しない前提で進めれば問題なくdjangoは使えると思います。 ## Python入門 デスクトップのPATHがwindows10においてUserの作成方法に応じてかわります。 `cd %HomePath%OneDrive\Desktop`(take) ``` マイクロソフトアカウントで新規ユーザーを作成している場合、注意しよう ``` ## プロジェクトを作成しよう! - 以下のエラーが出ても「Djangoのアプリは動いているので心配しないでください」と案内する - macOS10.14・Python3.7.3・Django2.2系で`python manage.py runserver`すると「ConnectionResetError」が発生しつつも動作するんですが、質問されても現時点では答えられないです(nikkie) >ConnectionResetError: [Errno 54] Connection reset by peer - 通信相手のsqliteが接続を終了したことを表す?[ref](https://docs.python.org/ja/3/library/exceptions.html#ConnectionResetError)→「Djangoのアプリは動いているので心配しないでください」でいいのかも。出さなくする方法はあるんでしょうか?(nikkie) - 僕はpipでDjango入れた時こういうエラーログは吐きませんでしたが、condaでDjango入れたらこのログ吐きました。解決する方法でpip installが出てくるので、試すのは危険な可能性。「Djangoのアプリは動いているので心配しないでください」で良いかもしれません(Yasshieeee) - 追記 pipとcondaでDjangoのインストールを比べてみたところ、djangoはpipで入れると2.2.6、condaで入れると2.2.5で、pytzは両方2019.2、sqlparseも両方0.3.0でした。依存ライブラリによる問題ではないようです。(Yasshieeee) ## Djangoモデル - Blogモデルのpublish_dateとcreate_dateがPython標準ライブラリのdatetime.datetime.now()ではなく、django.utils.timezone.now()を利用しているのはなぜですか。datetime.datetime.now()だとタイムゾーンをサポートしていない(tzinfo書けばタイムゾーン管理されるけど)からという認識で良いですか?(みずき) ``` >>> datetime.now() datetime.datetime(2019, 10, 5, 6, 17, 39, 585184) >>> timezone.now() datetime.datetime(2019, 10, 5, 6, 19, 29, 689090, tzinfo=<UTC>) ``` - [Django 公式サイト「Time zones」](https://docs.djangoproject.com/en/2.2/topics/i18n/timezones/#naive-and-aware-datetime-objects)(nikkie) - djangoアプリケーションをINSTALLED_APPSに追加する方法は'blog.apps.BlogConfig'でも'blog'でもできますが、何か違いってあるんでしたっけ・・(shinya) - 以前Slackで質問があり以下が案内されました:[stackoverflow](https://stackoverflow.com/a/34377341)や[ドキュメント](https://docs.djangoproject.com/ja/2.2/ref/applications/#for-application-authors) (nikkie) ## デプロイ! - スキップ。デプロイで悩むよりブログの作り込みを優先してほしい - 他の言語の経験があって、やりたい方に案内 ## その他 - これまでに質問されたFAQ集とかあったりしますでしょうか?(shinya) - 今後蓄積していきたい。このHackMDやSlackの#qaチャンネルに書いてくれると嬉しい ## 参加者 - お名前(呼ばれたい名前), 初参加/コーチ経験あり, Windows/Mac, 得意分野, 今ハマってること - マミ, コーチ経験あり, Mac, 土木と地図データ, akiyoko本セットkindleで買い直した - まどか, コーチ経験あり, Mac, プロジェクトマネジメント・データ分析, ボルダリング・日本語学とか - nikkie(にっきー), コーチ経験あり, Mac, わかりやすい解説と言われます, 健康を取り戻す😷 - take(たけ), 初参加, Windows, webbackend, PUBG(というゲーム) - Yasshieeee(やっしー) ,コーチ経験あり, Mac/Windiows/CentOS , 画像処理 ,強化学習(NAS), Webプロ大好き - u1(ゆーいち), 初参加, Mac, 建築と不動産, Xd - Raphael(ラファエル), 初参加, Mac, mypy/Djangoマイグレーション, マリオカート - Ayako,コーチ経験あり, Mac/Windows, 画像処理?, Beat Saber - himrock922(ひむろっく), 初参加, できればMac, Web開発、ネットワーク、OS、クラウド,パネルでポン、アメフト - Penguin,コーチ経験あり, Mac, データ分析/統計/自然言語処理, 仕事 - shinya(シンヤ), 初参加/コーチ経験なし, Windows系サーバ構築,ディープラーニング/ドラクエウォーク - nagasawa, コーチ経験あり/スタッフ, Windows, 現場警備 - みずき, コーチ経験あり, Mac/Linux, Web開発/モブプロ, コーヒー/自転車 - Yuki, コーチは初参加, Mac/Linux, 昼寝, お菓子作り - rikuru(りょうすけ), 初参加/コーチ経験なし, Mac, 楽をすることを考える, キャンプ - kaizumaki(かずき),コーチ/運営,Mac,フロントエンド,オープンソースにコントリビュート - Hilman (ヒルマン)、初参加、Mac\Linux、深層学習研究、言語勉強・Emacsにはまっている - homata, コーチ経験あり, Mac/windows/Linux, 地理空間情報、オープンデータ,Google Colaboratory,Geo+Python - - - - - ## 当日のタイムライン 13:30 説明 13:45 チュートリアルやってみよう 15:00 休憩 15:10 気になるところ、相談しよう 17:30 おわり 18:00 完全撤収→鳥メロ

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully