Python 3 upgrade finished

This commit is contained in:
Fergal Moran
2015-08-20 11:18:53 +01:00
parent 139e23d4c0
commit dfa82d4e76
132 changed files with 6399 additions and 6575 deletions

View File

@@ -1,14 +1,14 @@
import humanize
from django.core.management.base import NoArgsCommand
from spa.models.activity import Activity
class Command(NoArgsCommand):
def handle_noargs(self, **options):
try:
activity = Activity.objects.get(pk=13437)
if activity is not None:
date = humanize.naturaltime(activity.date.replace(tzinfo=None))
print date
except Exception, ex:
print "Debug exception: %s" % ex.message
import humanize
from django.core.management.base import NoArgsCommand
from spa.models.activity import Activity
class Command(NoArgsCommand):
def handle_noargs(self, **options):
try:
activity = Activity.objects.get(pk=13437)
if activity is not None:
date = humanize.naturaltime(activity.date.replace(tzinfo=None))
print(date)
except Exception as ex:
print("Debug exception: %s" % ex.message)