mirror of
https://github.com/Hopiu/django-tos.git
synced 2026-03-17 04:20:22 +00:00
Merge pull request #11 from nicholasserra/nicholasserra-django17
Fix warnings and test on latest Django 1.7 version.
This commit is contained in:
commit
551235a3aa
3 changed files with 6 additions and 4 deletions
|
|
@ -13,10 +13,10 @@ env:
|
|||
- DJANGO="Django==1.5"
|
||||
- DJANGO="Django==1.5.7"
|
||||
- DJANGO="Django==1.6.4"
|
||||
- DJANGO="https://www.djangoproject.com/m/releases/1.7/Django-1.7b1.tar.gz#egg=django"
|
||||
- DJANGO="Django==1.7.11"
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
# Python 2.6 support has been dropped in Django 1.7
|
||||
- python: "2.6"
|
||||
env: DJANGO="https://www.djangoproject.com/m/releases/1.7/Django-1.7b1.tar.gz#egg=django"
|
||||
env: DJANGO="Django==1.7.11"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.conf import settings
|
||||
|
||||
# Django 1.4 compatability
|
||||
try:
|
||||
|
|
@ -35,7 +34,8 @@ class TermsOfServiceManager(models.Manager):
|
|||
|
||||
|
||||
class TermsOfService(BaseModel):
|
||||
active = models.BooleanField(verbose_name=_('active'),
|
||||
active = models.BooleanField(default=False,
|
||||
verbose_name=_('active'),
|
||||
help_text=_(u'Only one terms of service is allowed to be active'))
|
||||
content = models.TextField(verbose_name=_('content'), blank=True)
|
||||
objects = TermsOfServiceManager()
|
||||
|
|
|
|||
|
|
@ -60,3 +60,5 @@ import django
|
|||
if hasattr(django, 'setup'):
|
||||
django.setup()
|
||||
|
||||
if django.VERSION > (1, 6):
|
||||
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
|
||||
|
|
|
|||
Loading…
Reference in a new issue