Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
I submitted a patch to the admin change form template -- http://code.djangoproject.com/ticket/15931. Meanwhile, you can temporarily get around the problem on a per-application basis by adding the attached file to the application package directory at templates/admin//change_form.html. --D --

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
at ultimately different from: if has_absolute_url -> display "view on site" link with href="{{ obj.get_absolute_url }}" (except that it appears the admin change form view doesn't pass the obj to the template context?!) ? --David On Friday, April 29, 2011 2:54:11 PM

Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
No doubt this is an edge case, but here goes ... With Django 1.3/Python 2.4 I have an app consisting of *unmanaged *models in *alternate *(non-default) database. Each model has defined get_absolute_url() simply as a fully-qualified (i.e.,external) URL string in which the instance id is substit

Passing extra context data to class-based generic views?

2011-04-06 Thread David Chandek-Stark
Function-based generic views provided an "extra_context" keyword argument to add variables to the template context. It appears that under the initial implementation of class-based generic views in Django 1.3, there are two major differences: 1. To add extra context, you have to subclass and ov