Commit b41cd7ad0c5a19d15d947cfbb895916a5e4bee07

Authored by Antoine Goutenoir
1 parent 77151d98
Exists in master

chore: review models

Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
flaskr/models.py
1   -import enum
2 1 import shelve
3 2 from os.path import join, isfile
4   -from flask_admin.contrib.sqla import ModelView
5 3  
6   -from flaskr.core import generate_unique_id, models
7   -from flask_sqlalchemy import SQLAlchemy
  4 +import enum
  5 +from flask_admin.contrib.sqla import ModelView
8 6 from flask_login import UserMixin, AnonymousUserMixin
  7 +from flask_sqlalchemy import SQLAlchemy
9 8 from werkzeug.security import generate_password_hash, check_password_hash
10 9 from yaml import safe_load as yaml_load
11 10  
12 11 from content import get_path, base_url
13   -
  12 +from flaskr.core import generate_unique_id, models
14 13  
15 14 # These are not the emission "models" in the scientific meaning of the word.
16 15 # They are the SQL Database Models.
... ... @@ -43,11 +42,12 @@ class Estimation(db.Model):
43 42 default=lambda: generate_unique_id(),
44 43 unique=True
45 44 )
  45 + status = db.Column(db.Enum(StatusEnum), default=StatusEnum.pending)
  46 +
46 47 email = db.Column(db.Unicode(1024))
47 48 first_name = db.Column(db.Unicode(1024)) # Antoine
48 49 last_name = db.Column(db.Unicode(1024)) # Goutenoir
49 50 institution = db.Column(db.Unicode(1024)) # IRAP
50   - status = db.Column(db.Enum(StatusEnum), default=StatusEnum.pending)
51 51 run_name = db.Column(db.Unicode(1024)) # JPGU 2020
52 52  
53 53 # City, Country
... ...