LoginSignup
3
2

More than 1 year has passed since last update.

Django 外部からのアクセス許可方法

Posted at

設定

settings.py
# ALLOWED_HOSTS = [] # もとはこうなっている
ALLOWED_HOSTS = ['*']

※プロジェクト名と同じフォルダ内にsettings.pyがある。

起動

python manage.py runserver 192.168.1.10:8000

※IPアドレスはサーバ起動しているPCまたはサーバのIPアドレス

3
2
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
3
2