Hello,
This is what I’m seeing. I’m using the exact same code from the github project but swapped Thing for Interview. Any ideas why this line is giving me trouble?
from collection.forms import InterviewForm
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.7.8
Python Version: 2.7.9
Installed Applications:
(‘collection’,
‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘django.contrib.humanize’)
Installed Middleware:
(‘django.contrib.sessions.middleware.SessionMiddleware’,
‘django.middleware.common.CommonMiddleware’,
‘django.middleware.csrf.CsrfViewMiddleware’,
‘django.contrib.auth.middleware.AuthenticationMiddleware’,
‘django.contrib.auth.middleware.SessionAuthenticationMiddleware’,
‘django.contrib.messages.middleware.MessageMiddleware’,
‘django.middleware.clickjacking.XFrameOptionsMiddleware’)
Traceback:
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/core/handlers/base.py” in get_response
98. resolver_match = resolver.resolve(request.path_info)
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/core/urlresolvers.py” in resolve
345. sub_match = pattern.resolve(new_path)
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/core/urlresolvers.py” in resolve
224. return ResolverMatch(self.callback, args, kwargs, self.name)
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/core/urlresolvers.py” in callback
231. self._callback = get_callable(self._callback_str)
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/utils/lru_cache.py” in wrapper
101. result = user_function(*args, **kwds)
File “/Users/ryandodds/projects/hellowebapp/venv/lib/python2.7/site-packages/django/core/urlresolvers.py” in get_callable
97. mod = import_module(mod_name)
File “/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py” in import_module
37. import(name)
File “/Users/ryandodds/projects/hellowebapp/collection/views.py” in
4. from collection.forms import InterviewForm
Exception Type: SyntaxError at /
Exception Value: invalid syntax (forms.py, line 4)