﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16790	GeoDjango tutorial error (selecting WorldBorders via admin crashes)	jdiego	jdiego	"First time django contributor; I may be doing something wrong, but here it goes...

Note that the crash does not occur with the 1.3.0 release (I'm running trunk, 1.4.0 alpha).

Got to the following point in the tutorial: ""Finally, browse to http://localhost:8000/admin/, and log in with the admin user created after running syncdb. Browse to any of the WorldBorders entries""

Clicking on ""WorldBorders"" causes the crash: ""'super' object has no attribute '_media'""

The following seems to be the problem:
the first thing that django.contrib.gis.admin.options.GeoModelAdmin._media()
does is to invoke... 
{{{
media = super(GeoModelAdmin, self)._media()  
}}}

The problem is that there was a recent changeset (16594) in the parent class (ModelAdmin).  In that changeset the following changed:

old:
{{{
def _media(self): 
}}}

new:
{{{
@property 
def media(self): 
}}}

I tested a patch (which I'll submit shortly) where GeoModelAdmin gets ""media"" from its parent as a property, instead of getting it via a method call.  This seems to fix the problem.  

{{{
media = super(GeoModelAdmin, self).media
}}}

Note that I ran the GeoDjangoTestSuiteRunner tests and although there were some errors, none of them seem to correspond to this case; however, I'm not positive about this."	Bug	closed	GIS	dev	Normal	fixed	GIS GeoDjango tutorial	john@…	Accepted	0	0	0	0	0	0
