Admin "Page not found"

2 views
Skip to first unread message

Cornel Nitu

unread,
May 5, 2006, 4:54:38 AM5/5/06
to Django users
Hi,

In the django svn version, I've created the following model:
"""
from django.db import models

class BaseItem(models.Model):
name = models.CharField(maxlength=200)

class Item(BaseItem):
phone = models.CharField(maxlength=200)
class Admin:
list_display = ('name', 'phone')
"""
When I add an instance of the Item class in the Admin interface,
everything works correctly and I see all the properties in the Item's
add form. After adding an Item object, the values are inserted in the
database. But, when I'm trying to edit it, I get the following error:
"""Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/admin/myproject/item/1/
"""

I know that in the 0.91 version I could link the "module_name" to the
class Meta. But, in the django latest development version (the svn
one), the "module_name" attribute does not exist anymore.

What am I missing? What should I do?

Adrian Holovaty

unread,
May 6, 2006, 10:21:31 PM5/6/06
to django...@googlegroups.com
On 5/5/06, Cornel Nitu <unrestrict...@gmail.com> wrote:
> When I add an instance of the Item class in the Admin interface,
> everything works correctly and I see all the properties in the Item's
> add form. After adding an Item object, the values are inserted in the
> database. But, when I'm trying to edit it, I get the following error:
> """Page not found (404)
> Request Method: GET
> Request URL: http://localhost:8000/admin/myproject/item/1/
> """
>
> I know that in the 0.91 version I could link the "module_name" to the
> class Meta. But, in the django latest development version (the svn
> one), the "module_name" attribute does not exist anymore.

If you can add an object successfully but get a 404 error on the
change form, perhaps your user account has "add" permission but
doesn't have "change" permission?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

Reply all
Reply to author
Forward
0 new messages