1👍
✅
Is home
in your preview/views.py
file? Somehow your from preview.views import *
did not import it in.
In which case, can you try to do
urlpatterns = patterns('preview.views',
(r'^catalog/$', 'home'),
)
instead?
And double check that the preview
app is included in your INSTALLED_APPS
tuple in your settings.py
file.
0👍
This is a very straight forward error. ‘home’ is not defined.
You haven’t imported it.
Think of what happens when you open a python terminal and type in
> foobar
> # NameError
Either import it in your urls.py or use string notation 'myapp.views.myfunc'
- [Answer]-Python Django Progress Bar django-progressbarupload
- [Answer]-Combine Django auth & Facebook auth
- [Answer]-Django increment one 'hit' for views in the current day
Source:stackexchange.com