Finished admin console
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
from ..models import Dataset
|
||||
from ..modules import db
|
||||
|
||||
from wtforms.validators import ValidationError
|
||||
@@ -46,11 +45,12 @@ def get_time_options():
|
||||
return time_options
|
||||
|
||||
def get_dataset_choices():
|
||||
from ..models import Dataset
|
||||
datasets = Dataset.query.all()
|
||||
dataset_choices = []
|
||||
for dataset in datasets:
|
||||
label = dataset['date'].strftime('%Y%m%d%H%M%S')
|
||||
label = dataset.date.strftime('%Y%m%d%H%M%S')
|
||||
label = f'{label} (Default)' if dataset.default else label
|
||||
choice = (dataset['id'], label)
|
||||
choice = (dataset.id, label)
|
||||
dataset_choices.append(choice)
|
||||
return dataset_choices
|
Reference in New Issue
Block a user