Forums

[makayo.pythonanywhere.com] NameError: name 'makayo' is not defined

Greeting. I try to just start the web server and get to the welcome page but I get the following error.

https://docs.djangoproject.com/en/1.10/intro/tutorial01/

https://help.pythonanywhere.com/pages/FollowingTheDjangoTutorial/

I am on python3.5 and django1.10

Where I should get my username defined ??

The last two line of the error

ALLOWED_HOSTS = [makayo.pythonanywhere.com]
NameError: name 'makayo' is not defined

2016-10-19 23:40:10,099 :Error running WSGI application Traceback (most recent call last): File "/bin/user_wsgi_wrapper.py", line 154, in call app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 154, in call app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e File "/bin/user_wsgi_wrapper.py", line 179, in <module> application = load_wsgi_application() File "/bin/user_wsgi_wrapper.py", line 175, in load_wsgi_application return import(os.environ['WSGI_MODULE'], globals(), locals(), ['application']).application File "/var/www/makayo_pythonanywhere_com_wsgi.py", line 89, in <module> application = get_wsgi_application() File "/home/makayo/.virtualenvs/django110/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup(set_prefix=False) File "/home/makayo/.virtualenvs/django110/lib/python3.5/site-packages/django/init.py", line 22, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/home/makayo/.virtualenvs/django110/lib/python3.5/site-packages/django/conf/init.py", line 53, in getattr self._setup(name) File "/home/makayo/.virtualenvs/django110/lib/python3.5/site-packages/django/conf/init.py", line 41, in _setup self._wrapped = Settings(settings_module) File "/home/makayo/.virtualenvs/django110/lib/python3.5/site-packages/django/conf/init.py", line 97, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/home/makayo/.virtualenvs/django110/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "./mysite/settings.py", line 28, in <module> ALLOWED_HOSTS = [makayo.pythonanywhere.com] NameError: name 'makayo' is not defined

I figure it out. I didn't put single_quote....duhhh

Glad you worked it out :-)