Commits

Andrew Davison committed 7c79618

Can now specify non-standard port for PostgreSQL database.

  • Participants
  • Parent commits bd5db06

Comments (0)

Files changed (2)

File sumatra/recordstore/django_store/__init__.py

             db['HOST'] = parse_result.hostname
             db['USER'] = parse_result.username
             db['PASSWORD'] = parse_result.password
+            db['PORT'] = parse_result.port or ''
         else:
             db['ENGINE'] = 'django.db.backends.sqlite3'
             db['NAME'] = os.path.abspath(parse_result.path)
                 if not os.path.exists(os.path.dirname(db_file)):
                     os.makedirs(os.path.dirname(db_file))
                 management.call_command('syncdb', database=label, verbosity=0)
-                print("Created Django record store using SQLite")
             else:
                 management.call_command('syncdb', database=label, verbosity=0)
-                print("Created Django record store using PostgreSQL")
 
     def configure(self):
         settings = django_conf.settings

File sumatra/recordstore/django_store/models.py

 
 class Datastore(BaseModel):
     type = models.CharField(max_length=100)
-    parameters = models.CharField(max_length=100)
+    parameters = models.CharField(max_length=200)
 
     def to_sumatra(self):
         parameters = eval(self.parameters)
     processor = models.CharField(max_length=100)
     release = models.CharField(max_length=100)
     system_name = models.CharField(max_length=20)
-    version = models.CharField(max_length=50)
+    version = models.CharField(max_length=100)
 
     def to_sumatra(self):
         pi = {}