Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test against django 1.5

  • Loading branch information...
commit 03addd238124248210a33098a0b0e58a8a25a68d 1 parent 78a2e75
@zbyte64 authored
View
5 .travis.yml
@@ -4,8 +4,9 @@ python:
- "2.7"
# - "3.2"
env:
- - DJANGO_VERSION=1.4.3
- - DJANGO_VERSION=1.3.5
+ - DJANGO_VERSION=1.4.5
+ - DJANGO_VERSION=1.3.7
+ - DJANGO_VERSION=1.5.1
install:
- pip install -q Django==$DJANGO_VERSION
View
7 hyperadmin/sites.py
@@ -87,7 +87,10 @@ def register_builtin_media_types(self):
def get_html_type_from_field(self, field):
#TODO fill this out, datetime, etc
from django.forms import widgets
- widget = field.field.widget
+ from django.forms import FileField
+ if hasattr(field, 'field'): #CONSIDER internally we use boundfield
+ field = field.field
+ widget = field.widget
if isinstance(widget, widgets.Input):
return widget.input_type
if isinstance(widget, widgets.CheckboxInput):
@@ -95,6 +98,8 @@ def get_html_type_from_field(self, field):
if isinstance(widget, widgets.Select):
#if widget.allow_multiple_selected
return 'select'
+ if isinstance(field, FileField):
+ return 'file'
self.get_logger().warning('Unhandled widget type: %s' % type(widget))
return 'text'
View
2  tests/test_settings.py
@@ -85,7 +85,7 @@
)
# Make this unique, and don't share it with anybody.
-SECRET_KEY = ''
+SECRET_KEY = 'NOTASECRET'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
View
14 tox.ini
@@ -9,6 +9,8 @@ envlist =
py27_django13,
py26_django14,
py27_django14,
+ py26_django15,
+ py27_django15,
[testenv]
commands = python setup.py test
@@ -27,6 +29,12 @@ deps =
Django>=1.4, <1.5
-r{toxinidir}/requirements.txt
+[testenv:py26_django15]
+basepython = python2.6
+deps =
+ Django>=1.5, <1.6
+ -r{toxinidir}/requirements.txt
+
[testenv:py27_django13]
basepython = python2.7
deps =
@@ -40,3 +48,9 @@ deps =
Django>=1.4, <1.5
-r{toxinidir}/requirements.txt
+[testenv:py27_django15]
+basepython = python2.7
+deps =
+ Django>=1.5, <1.6
+ -r{toxinidir}/requirements.txt
+
Please sign in to comment.
Something went wrong with that request. Please try again.