Hi all,
while going through the dajngo tutorial i stuck while executing a code i.e., mentioned below. It is shoeing "Invalid HTTP_HOST header: 'testserver'. You may need to add 'testserver' to ALLOWED_HOSTS.".
the code is written in python manage.py shell.i.e.,
PS C:\Users\AVITABAYAN\mysite> python manage.py shell
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.test import Client
>>> #...
>>> client = Client()
>>> #...
>>> response = client.get('/')
Invalid HTTP_HOST header: 'testserver'. You may need to add 'testserver' to ALLOWED_HOSTS.
please find what is error and comment.Thank you