Skip to content

Commit

Permalink
Merge pull request #21 from dstegelman/feature/python3
Browse files Browse the repository at this point in the history
Python 3
  • Loading branch information
dstegelman committed Apr 4, 2015
2 parents 25960ae + 37629d5 commit b81b634
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python

python:
- "2.7"
- "3.4"

env:
- DJANGO_VERSION=Django==1.4.2
Expand All @@ -18,3 +19,9 @@ install:

script:
- python runtests.py


matrix:
exclude:
- python: "3.4"
env: DJANGO_VERSION=Django==1.4.2
7 changes: 7 additions & 0 deletions build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pip install twine

pip install wheel

python setup.py sdist bdist_wheel

twine upload dist/*
5 changes: 4 additions & 1 deletion downtime/models.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
from django.db import models
from django.utils.encoding import python_2_unicode_compatible


from downtime.managers import PeriodManager


@python_2_unicode_compatible
class Period(models.Model):
start_time = models.DateTimeField(blank=True, null=True)
end_time = models.DateTimeField(blank=True, null=True)
enabled = models.BooleanField(default=False)

objects = PeriodManager()

def __unicode__(self):
def __str__(self):
return "Scheduled downtime"
3 changes: 0 additions & 3 deletions downtime/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class DowntimeModelTest(TestCase):
def setUp(self):
self.period = PeriodFactory.create()

def test_unicode(self):
self.assertEqual(self.period.__unicode__(), 'Scheduled downtime')

def test_active(self):
self.assertTrue(Period.objects.active().count())

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Framework :: Django",
"Framework :: Django :: 1.4",
"Framework :: Django :: 1.5",
"Framework :: Django :: 1.6",
"Framework :: Django :: 1.7",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
"Topic :: Utilities",
Expand All @@ -24,7 +30,7 @@
url='http://github.com/dstegelman/django-downtime',
license='MIT',
packages=find_packages(),
install_requires = [],
install_requires=[],
include_package_data=True,
zip_safe=False,
)

0 comments on commit b81b634

Please sign in to comment.