Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54430

django admin.py error

Date 2013-09-19 09:04 -0700
From Gary Roach <gary719_list1@verizon.net>
Subject django admin.py error
Newsgroups comp.lang.python
Message-ID <mailman.154.1379606716.18130.python-list@python.org> (permalink)

Show all headers | View raw


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



Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

django admin.py error Gary Roach <gary719_list1@verizon.net> - 2013-09-19 09:04 -0700
  Re: django admin.py error John Gordon <gordon@panix.com> - 2013-09-19 18:15 +0000
    Re: django admin.py error Gary Roach <gary719_list1@verizon.net> - 2013-09-19 11:49 -0700
      Re: django admin.py error John Gordon <gordon@panix.com> - 2013-09-19 18:56 +0000
        Re: django admin.py error (solved) Gary Roach <gary719_list1@verizon.net> - 2013-09-19 12:33 -0700

csiph-web