diadia

興味があることをやってみる。自分のメモを残しておきます。

2019-01-13から1日間の記事一覧

centos7にpythonやpipを入れる

centos7にepelを使う 以下のコマンドでepelをいれることができる。このepelを使ってpithon,pipを入れていく。各コマンドはrootユーザ出ない場合、sudoを付け加えること。 参考:https://cjsawer.whitewillow.co.uk/2018/08/29/epel-python-3-6-with-pip-on-c…

django ログインユーザしか見れない構造の作り方

ユーザログインしているときだけ見える構造を構築する方法 実装例 views.py def hoge(): context = { } return render(request, "index.html",context ) #又はclass-based-viewを使う場合には、 class Diary(ListView): model = diaries template_name = "in…