django admin.py error

Gary Roach gary719_list1 at verizon.net
Thu Sep 19 12:04:57 EDT 2013


Installation of the django admin.py package worked fine. But. when I 
tried to add my database to the admin page I get the following error:

	ImportError at /admin/

	cannot import name membership

	Request Method: 	GET
	Request URL: 	http://127.0.0.1:8000/admin/
	Django Version: 	1.5.2
	Exception Type: 	ImportError
	Exception Value: 	

	cannot import name membership

	Exception Location: 	
		/home/gary/ProgramFiles/mysite/mysite/admin.py 		in 		<module>, line 4
	Python Executable: 	/usr/bin/python
	Python Version: 	2.7.3
	Python Path: 	

	['/home/gary/ProgramFiles/mysite/mysite',
	 '/usr/lib/python2.7',
	 '/usr/lib/python2.7/plat-linux2',
	 '/usr/lib/python2.7/lib-tk',
	 '/usr/lib/python2.7/lib-old',
	 '/usr/lib/python2.7/lib-dynload',
	 '/usr/local/lib/python2.7/dist-packages',
	 '/usr/lib/python2.7/dist-packages',
	 '/usr/lib/python2.7/dist-packages/PIL',
	 '/usr/lib/python2.7/dist-packages/gtk-2.0',
	 '/usr/lib/pymodules/python2.7',
	 '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']

My admin.py file is:
	#Adding this app to the admin page.

	from django.contrib import admin
	from mysite.models import membership, address, status, 	audio, video, 
photos

	admin.site.register(membership)
	admin.site.register(address)
	admin.site.register(status)
	admin.site.register(audio)
	admin.site.register(video)
	admin.site.register(photos)

I can't seem to locate the source of the problem. Everything seems to be 
installed properly.

Any help will be sincerely appreciated.

Gary R







More information about the Python-list mailing list