Line 125 of throws an exception with the latest Django trunk

Bug #503652 reported by Zeth on 2010-01-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Hello line 125 of: django_tables/


The .as_sql method is gone from the Django trunk, therefore when you using django-tables you get:

'Query' object has no attribute 'as_sql'

Deleting the line stops the error, but obviously breaks whatever this line was trying to do.

Zeth (zeth0) wrote :

An equivalent would be _temp.query.__str__() but I do not know if that would have whatever side-effect you need to throw the exception. Surely there is a more direct way of doing whatever you are trying to do?

Anyhow, this is what I used.

                    # let django validate the lookup
                    _temp = self.queryset.order_by(lookup)
                except FieldError:

Michael Elsdörfer (miracle2k) wrote :

Thanks, just committed the fix; might take a couple hours for Launchpad to sync.

Changed in django-tables:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers