name 'HoleImage' is not defined
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/admin/ |
Django Version: | 1.6.5 |
Exception Type: | NameError |
Exception Value: | name 'HoleImage' is not defined |
Exception Location: | /Users/my_laptop/development/golfsmart/holes/admin.py in HoleImageInline, line 5 |
Python Executable: | /usr/bin/python |
Python Version: | 2.7.5 |
You need to import HoleImage in admin.py
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7079f896-e765-428f-a95a-6f953ad105f8%40googlegroups.com.
In admin.py you have
from hotels.models import Hole
Add HoleImage to that import
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7079f896-e765-428f-a95a-6f953ad105f8%40googlegroups.com.
name 'Hole' is not defined
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/admin/ |
Django Version: | 1.6.5 |
Exception Type: | NameError |
Exception Value: | name 'Hole' is not defined |
---|---|
Exception Location: | /Users/my_laptop/development/golfsmart/holes/admin.py in <module>, line 12 |
Python Executable: | /usr/bin/python |
---|---|
Python Version: | 2.7.5 |
Oh and in the last line, admin.site.register, use the model you want to register in the Admin
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fca37d2a-b54f-4cec-af32-df5a6d1bfbdf%40googlegroups.com.
When you import HoleImage don't remove Hole :)
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fca37d2a-b54f-4cec-af32-df5a6d1bfbdf%40googlegroups.com.