About Domain for Local Website

You can set a domain for your local Django website in the /etc/hosts:

1
127.0.0.1 djangotricks.local

Then run the Django development server with that domain:

1
$ python manage.py runserver djangotricks.local:8000

That's useful for distinguishing cookies between local projects.

Tips and Tricks Dev Ops Development Django 4.2 Django 3.2 Django 2.2