【Django】ChatGPT APIのストリーム機能を使う方法
![Thumbnail of post image 014](https://next-k.site/blog/wp-content/uploads/2023/04/chatgpt-960x504-1-640x336.png)
この記事では、DjangoとuWSGIを使ってChatGPT APIのストリーム機能を利用する方法を解説します。ストリーム機能を使用することで、リアルタイムでの応答や効率的なデータ処理が可能になります。この記事では、以下の設定が必要な ...
【Django】postリクエストで送られてきたCSVファイルの処理
![Thumbnail of post image 025](https://next-k.site/blog/wp-content/uploads/2021/11/python-top2-640x360.png)
def import_csv(request): if request.method == 'POST' and request.FILES: myfile = request.FILES # Read csv file I ...
【Django】定期実行する方法(APScheduler)
![Thumbnail of post image 156](https://next-k.site/blog/wp-content/uploads/2022/02/django-640x291.png)
1時間に1回、データを取得しデータベースに保存したり、毎朝4時にデータベースの重複チェックを行いデータの整理をするなど、自動実行する方法です。
APSchedulerをインストールAPSchedulerをインストールします ...
【python】djangoをXserver にデプロイする
![Thumbnail of post image 013](https://next-k.site/blog/wp-content/uploads/2022/02/django-640x291.png)
Linuxbrewを使ってデプロイを試みたが、途中でエラーでどうにもならなくなり、Minicondaを使用する方法に変更した。本当にメモです。
# 発生したエラーPermissionError: 許可がありません: ' ...【python】XserverにDjangoをデプロイしたがJWT認証ができない
![Thumbnail of post image 077](https://next-k.site/blog/wp-content/uploads/2022/02/django-640x291.png)
ローカル環境ではうまく動いていたのに、サーバーに上げた途端に認証されなくなってしまった。
仕様・python 3.9.9
・django 3.2.11
・django-rest-framework 3.13 ...
【python】djangoでAPIを作成したときのメモ
![Thumbnail of post image 158](https://next-k.site/blog/wp-content/uploads/2022/02/django-640x291.png)
djangoでAPIを作ったときのメモです
仕様django 3.2.11django-rest-framework 3.13.1
django-rest-framework-jwt 1.11.0
mysql ...