Skip to main content

5 posts tagged with "Django"

View All Tags

アプリを作成する

djangoのstartappの代わりに、create-react-appでアプリを作成します。 nodeをインストール後、npm install -g create-react-appを実行することで使用できます。

  • django-admin startproject my-project
  • cd my-project
  • create-react-app my-react-app
  • cd my-react-app

本サイトに使ったfetchするurlを相対的に指定するCursorPaginationのメモです。 次のDjangoのPaginationのうち、データ更新が頻繁なアプリにはカーソル型が適しています。

  • PageNumberPagination e.g. ~/?page=4
  • LimitOffsetPagination e.g. ~/?limit=5&offset=400
  • CursorPagination e.g. ~/?cursor=cj0xJnA9MjAxOC

今年の春にDjangoを勉強して、gunicornとHerokuでデプロイしたアプリを 半年放置していたらサーバーエラーで動かなくなっていました。。。

AWSがKyashというデビッドカードを使えたので使ってみました。 下のサイト通りにしたらうまくいきました。(特に最初のサイト凄い!20分!)。 AWSで初めてデプロイしたので、作業中のメモをまとめました。