Now compatible with python 3.3
parent
41277a1f83
commit
130c98a702
|
@ -18,7 +18,7 @@ def attach_uuid(sender, instance, **kwargs):
|
|||
# if sender class does not have uuid field.
|
||||
if 'uuid' in fields:
|
||||
if not instance.uuid:
|
||||
instance.uuid = unicode(uuid.uuid1())
|
||||
instance.uuid = str(uuid.uuid1())
|
||||
|
||||
|
||||
# Patch api view for correctly return 401 responses on
|
||||
|
|
|
@ -50,7 +50,7 @@ class Command(BaseCommand):
|
|||
role = Role.objects.all()[0]
|
||||
|
||||
# projects
|
||||
for x in xrange(3):
|
||||
for x in range(3):
|
||||
project = self.create_project(x)
|
||||
|
||||
for user in self.users:
|
||||
|
@ -59,15 +59,15 @@ class Command(BaseCommand):
|
|||
start_date = now() - datetime.timedelta(35)
|
||||
|
||||
# create random milestones
|
||||
for y in xrange(self.sd.int(1, 5)):
|
||||
for y in range(self.sd.int(1, 5)):
|
||||
end_date = start_date + datetime.timedelta(15)
|
||||
milestone = self.create_milestone(project, start_date, end_date)
|
||||
|
||||
# create uss asociated to milestones
|
||||
for z in xrange(self.sd.int(3, 7)):
|
||||
for z in range(self.sd.int(3, 7)):
|
||||
us = self.create_us(project, milestone)
|
||||
|
||||
for w in xrange(self.sd.int(0,6)):
|
||||
for w in range(self.sd.int(0,6)):
|
||||
if start_date <= now() and end_date <= now():
|
||||
task = self.create_task(project, milestone, us, start_date, end_date, closed=True)
|
||||
elif start_date <= now() and end_date >= now():
|
||||
|
@ -79,15 +79,15 @@ class Command(BaseCommand):
|
|||
start_date = end_date
|
||||
|
||||
# created unassociated uss.
|
||||
for y in xrange(self.sd.int(8,15)):
|
||||
for y in range(self.sd.int(8,15)):
|
||||
us = self.create_us(project)
|
||||
|
||||
# create bugs.
|
||||
for y in xrange(self.sd.int(15,25)):
|
||||
for y in range(self.sd.int(15,25)):
|
||||
bug = self.create_bug(project)
|
||||
|
||||
# create questions.
|
||||
#for y in xrange(self.sd.int(15,25)):
|
||||
#for y in range(self.sd.int(15,25)):
|
||||
# question = self.create_question(project)
|
||||
|
||||
def create_question(self, project):
|
||||
|
|
|
@ -305,7 +305,7 @@ from .appdefaults import *
|
|||
# Test conditions
|
||||
if 'test' in sys.argv:
|
||||
if "settings" not in ",".join(sys.argv):
|
||||
print "\033[1;91mNot settings specified.\033[0m"
|
||||
print ("\033[1;91mNot settings specified.\033[0m")
|
||||
print ("Try: \033[1;33mpython manage.py test --settings="
|
||||
"greenmine.settings.testing -v2\033[0m")
|
||||
sys.exit(0)
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
# We use Django 1.6,
|
||||
#git+https://github.com/django/django.git@stable/1.6.x
|
||||
#django-reversion==1.7.1
|
||||
|
||||
|
||||
#djangorestframework==2.3.8
|
||||
git+https://github.com/tomchristie/django-rest-framework.git@2.4.0
|
||||
git+https://github.com/etianen/django-reversion.git@django-1.6
|
||||
|
||||
Fabric==1.6.0
|
||||
Flask==0.10.1
|
||||
South==0.8.2
|
||||
Werkzeug==0.9.4
|
||||
Whoosh==2.5.4
|
||||
|
@ -19,20 +13,16 @@ celery==3.0.23
|
|||
django-celery==3.0.23
|
||||
django-filter==0.7
|
||||
django-grappelli==2.4.6
|
||||
django-guardian==1.1.0.beta
|
||||
django-haystack==2.1.0
|
||||
django-picklefield==0.3.0
|
||||
django-sampledatahelper==0.2.1
|
||||
gunicorn==17.5
|
||||
gunicorn>=17.5
|
||||
kombu==2.5.14
|
||||
mimeparse==0.1.3
|
||||
paramiko==1.10.1
|
||||
psycopg2==2.5.1
|
||||
pycrypto==2.6
|
||||
python-dateutil==2.1
|
||||
pytz==2013d
|
||||
six==1.4.1
|
||||
six>=1.4.1
|
||||
djmail>=0.3
|
||||
django-jinja==0.21
|
||||
jinja2==2.7.1
|
||||
pygments==1.6
|
||||
pygments>=1.6
|
||||
|
|
Loading…
Reference in New Issue