On Mon, Feb 9, 2009 at 3:40 PM, Julien Phalip <jpha...@gmail.com> wrote:
> > On Feb 9, 7:20 pm, Julien Phalip <jpha...@gmail.com> wrote: > > Hi, > > > > This is a strange case. I have a simple blog entry model which can be > > edited in the admin, from the URL that looks like: > http://www.example.com.au/admin/blog/entry/52/ > > > > Now, what is strange is that the link above returns a 404. Same with > > the entry id=51. Yet, entries with id=51,52 do exist. > > > > - All other entries (with id < 51) work fine in the admin. > > - All entries (including id=51,52) work fine on the front end. > > - Everything works fine when I test it locally on my computer with a > > replica of the online database. > > > > I've never come across something like that, and I'm not sure where to > > look to debug this. Would you have some hints to suggest? > > > > Thanks a lot for your help, > > > > Julien > > > > PS: It is using a quite old version of Django, a trunk revision > > between 0.96 and 1.0. > > Hi, > > I've narrowed down the issue a bit. First, it's using revision 7901, > that is before newforms-admin. > The problem is in the 'change_stage' view: > > def change_stage(request, app_label, model_name, object_id): > ... > try: > manipulator = model.ChangeManipulator(object_id) > except model.DoesNotExist: > raise Http404('%s object with primary key %r does not exist' % > (model_name, escape(object_id))) > ... > > When retrieving the manipulator it raises a 'DoesNotExist' exception: > > str: Traceback (most recent call last): > File "<string>", line 1, in <module> > File "C:\Djangos\catalyst\django\db\models\manipulators.py", line > 260, in __init__ > self.original_object = self.manager.get(pk=obj_key) > File "C:\Djangos\catalyst\django\db\models\manager.py", line 82, in > get > return self.get_query_set().get(*args, **kwargs) > File "C:\Djangos\catalyst\django\db\models\query.py", line 294, in > get > % self.model._meta.object_name) > DoesNotExist: Entry matching query does not exist. > > But I only get that with those two Entry items (id=51,52). Why don't I > get it for the other items (id < 51)? > > I'm really lost here. There must be some kind of corruption in the > data meaning it cannot find those particular items, but what could it > be? Again, those 2 blog entries work fine when displayed in the > frontend. > > Do you think it could be a bug in that particular revision of Django > I'm using? > > Any help would be appreciated. > > Julien > > > I don't know what manager old forms admin used, but do you have a custom manager that blocks access to some objects. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---