diff --git a/core/models.py b/core/models.py index 5b15d50e..0c9b9838 100755 --- a/core/models.py +++ b/core/models.py @@ -105,7 +105,7 @@ class Key(models.Model): return "Key with name {0}".format(self.name) class CeleryTask(models.Model): - created = models.DateTimeField(auto_now_add=True, default=now()) + created = models.DateTimeField(auto_now_add=True) task_id = models.CharField(max_length=255) user = models.ForeignKey(User, related_name="tasks", null=True) description = models.CharField(max_length=2048, null=True) # a description of what the task is @@ -259,8 +259,7 @@ class Acq(models.Model): CHOICES = ((INDIVIDUAL,'Individual license'),(LIBRARY,'Library License'),(BORROWED,'Borrowed from Library'), (TESTING,'Just for Testing'), (RESERVE,'On Reserve'),(THANKED,'Already Thanked'),) created = models.DateTimeField(auto_now_add=True, db_index=True,) expires = models.DateTimeField(null=True) - refreshes = models.DateTimeField(auto_now_add=True, default=now()) - refreshes.editable=True + refreshes = models.DateTimeField(auto_now_add=True) refreshed = models.BooleanField(default=True) work = models.ForeignKey("Work", related_name='acqs', null=False) user = models.ForeignKey(User, related_name='acqs') diff --git a/libraryauth/models.py b/libraryauth/models.py index 9c1ac263..d04c99b3 100644 --- a/libraryauth/models.py +++ b/libraryauth/models.py @@ -205,6 +205,10 @@ class IPAddressModelField(models.IPAddressField): defaults = {'form_class': IPAddressFormField} defaults.update(kwargs) return super(models.IPAddressField, self).formfield(**defaults) + + def deconstruct(self): + name, path, args, kwargs = super(models.IPAddressField, self).deconstruct() + return name, path, args, kwargs class Block(models.Model): library = models.ForeignKey(Library, related_name='ip_auths') @@ -230,10 +234,6 @@ class Block(models.Model): ordering = ['lower',] -from south.modelsinspector import add_introspection_rules -escaped_package= __name__.replace('.', '\.') -add_introspection_rules([], ['^' + escaped_package + '\.IPAddressModelField']) - # from http://en.wikipedia.org/wiki/Luhn_algorithm#Implementation_of_standard_Mod_10 def luhn_checksum(card_number): def digits_of(n): diff --git a/requirements_versioned.pip b/requirements_versioned.pip index 81f741cd..9b7a59e9 100644 --- a/requirements_versioned.pip +++ b/requirements_versioned.pip @@ -7,7 +7,6 @@ PyPDF2==1.23 PyGithub==1.15.0 PyYAML==3.11 git+git://github.com/urschrei/pyzotero.git@v0.9.51 -South==0.8.4 SPARQLWrapper==1.6.4 WebOb==1.2.3 WebTest==1.4.0 diff --git a/settings/common.py b/settings/common.py index 0458c1d6..47099af4 100644 --- a/settings/common.py +++ b/settings/common.py @@ -143,7 +143,6 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', 'django_comments', 'django.contrib.humanize', - 'south', 'django_extensions', 'regluit.frontend', 'regluit.api', @@ -310,8 +309,6 @@ LOGIN_ERROR_URL = '/accounts/login-error/' USER_AGENT = "unglue.it.bot v0.0.1 " -SOUTH_TESTS_MIGRATE = True - AUTH_PROFILE_MODULE = "core.UserProfile" # The amount of the transaction that Gluejar takes @@ -468,13 +465,6 @@ DROPBOX_KEY = '4efhwty5aph52bd' #for unglue.it, just.unglue.it # generated from rdhyee account GITHUB_PUBLIC_TOKEN = 'f702409f913d7f9046f93c677710f829e2b599c9' -# https://github.com/celery/django-celery/blob/master/docs/introduction.rst#for-django-17-and-newer -SOUTH_MIGRATION_MODULES = { - 'default': 'social.apps.django_app.default.south_migrations', - 'tastypie': 'tastypie.south_migrations', - 'djcelery': 'djcelery.south_migrations', -} - MOBIGEN_URL = "https://docker.gluejar.com:5001/mobigen" MOBIGEN_USER_ID = "admin" MOBIGEN_PASSWORD = "CXq5FSEQFgXtP_s"