|
0 |
Description: Ensure it works with packages available in Debian/Squeeze
|
|
1 |
Changes to ensure Django 1.2 support and Python 2.6 support works.
|
|
2 |
Author: Brian May <bam@debian.org>
|
|
3 |
|
|
4 |
---
|
|
5 |
The information above should follow the Patch Tagging Guidelines, please
|
|
6 |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
7 |
are templates for supplementary fields that you might want to add:
|
|
8 |
|
|
9 |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
10 |
Bug: <url in upstream bugtracker>
|
|
11 |
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
12 |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
13 |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
14 |
Reviewed-By: <name and email of someone who approved the patch>
|
|
15 |
Last-Update: <YYYY-MM-DD>
|
|
16 |
|
|
17 |
--- django-tables-0.9.6.orig/django_tables2/columns.py
|
|
18 |
+++ django-tables-0.9.6/django_tables2/columns.py
|
|
19 |
@@ -276,7 +276,7 @@ class LinkColumn(Column):
|
|
20 |
# and use that to decide whether to render a link or just the default
|
|
21 |
try:
|
|
22 |
raw = bound_column.accessor.resolve(record)
|
|
23 |
- except (TypeError, AttributeError, KeyError, ValueError) as e:
|
|
24 |
+ except (TypeError, AttributeError, KeyError, ValueError):
|
|
25 |
raw = None
|
|
26 |
if raw is None:
|
|
27 |
return self.default
|
|
28 |
--- django-tables-0.9.6.orig/django_tables2/tables.py
|
|
29 |
+++ django-tables-0.9.6/django_tables2/tables.py
|
|
30 |
@@ -6,7 +6,6 @@ from django.http import Http404
|
|
31 |
from django.utils.datastructures import SortedDict
|
|
32 |
from django.template import RequestContext
|
|
33 |
from django.template.loader import get_template
|
|
34 |
-from django.test.client import RequestFactory
|
|
35 |
from django.utils.encoding import StrAndUnicode
|
|
36 |
import sys
|
|
37 |
from .utils import Accessor, AttributeDict, OrderBy, OrderByTuple, Sequence
|
|
38 |
@@ -285,6 +284,7 @@ class Table(StrAndUnicode):
|
|
39 |
generated will clobber the querystring of the request. Use the
|
|
40 |
``{% render_table %}`` template tag instead.
|
|
41 |
"""
|
|
42 |
+ from django.test.client import RequestFactory
|
|
43 |
request = RequestFactory().get('/')
|
|
44 |
template = get_template(self.template)
|
|
45 |
return template.render(RequestContext(request, {'table': self}))
|