def __init__(self, settings={}):
super().__init__()
self.db = settings['pgwui'].get('default_db', '')
+ self.user = ''
+ self.password = ''
- user = ''
- password = ''
-
-class AuthInitialPost():
- def __init__(self, settings={}):
- super().__init__()
-
- db = ''
- user = ''
- password = ''
-
-
-class UploadFileInitialPost(AuthInitialPost):
+class UploadFileInitialPost(UserInitialPost):
def __init__(self, settings={}):
super().__init__(settings)
-
- upload_fmt = CSV
- datafile = ''
- trim_upload = True
- literal_col_headings = False
+ self.upload_fmt = CSV
+ self.trim_upload = True
+ self.literal_col_headings = False
+ self.datafile = ''
class UploadNullFileInitialPost(UploadFileInitialPost):
def __init__(self, settings={}):
super().__init__(settings)
-
- upload_null = True
- null_rep = ''
+ self.upload_null = True
+ self.null_rep = ''
class UploadTableInitialPost(UploadNullFileInitialPost):
def __init__(self, settings={}):
super().__init__(settings)
-
- table = ''
+ self.table = ''
# The wtforms that suck data out of the html.
# just to keep my hand in.
db = StringField('Database:')
- ivals = AuthInitialPost
+ ivals = UserInitialPost
class UploadFileWTForm(AuthWTForm):