diff --git a/.DS_Store b/.DS_Store index 90c6f1b..3b02fa6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4c71317 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine +RUN apk --update add bash nano +ENV STATIC_URL /static +ENV STATIC_PATH /var/www/app/static +COPY ./requirements.txt /var/www/requirements.txt +RUN pip install -r /var/www/requirements.txt + diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..9806897 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/forms.py b/app/forms.py index 9a3d0aa..7170ad2 100755 --- a/app/forms.py +++ b/app/forms.py @@ -6,33 +6,26 @@ from wtforms import Form as NoCsrfForm from wtforms.fields import StringField, FormField, SubmitField, SelectField, RadioField from app.models import Location, LocationSchema from wtforms.fields import DecimalRangeField +from wtforms.widgets import TextArea # - - - Forms - - - # class AuthorForm(NoCsrfForm): -# # this forms is never exposed so we can user the non CSRF version +# # this forms is never exposed so we can use the non CSRF version # author_name = StringField('Author Name', validators=[DataRequired()]) -# class UploadForm(FlaskForm): -# title = StringField('title', validators=[InputRequired()]) -# author = FieldList(FormField(AuthorForm, default=lambda: Author()), min_entries=1) -# category = StringField('category', validators=[InputRequired()]) -# year_published = StringField('year published', [validators.Length(max=4)],default=None) -# file = FileField() -# upload = SubmitField(label='Upload') -# wish = SubmitField(label='''I don't have the file, but wish I did.''') -# message = StringField('message', default=None) -# sameness = DecimalRangeField('sameness', default=0) -# diversity = DecimalRangeField('diversity', default=0) -# gender = DecimalRangeField('gender', default=50) -# choices = [('Student', 'Student'), -# ('Librarian', 'Librarian'), -# ('Pirate', 'Pirate'), -# ('Teacher', 'Teacher'), -# ('Institution', 'Institution'), -# ('All of the above', 'All of the above'), -# ('None of the above', 'None of the above')] -# who = SelectField('', choices=choices, default='Student') +class UploadText(FlaskForm): + message = StringField('message', widget=TextArea(), default=None) + longitude = DecimalRangeField('longitude', default=0) + latitude = DecimalRangeField('latitude', default=0) + + +class UploadAudio(FlaskForm): + message = StringField('message', widget=TextArea(), default=None) + audio = FileField() + longitude = DecimalRangeField('longitude', default=0) + latitude = DecimalRangeField('latitude', default=0) + # class EditForm(FlaskForm): diff --git a/app/models.py b/app/models.py index 297d88c..1d55dcc 100755 --- a/app/models.py +++ b/app/models.py @@ -25,6 +25,9 @@ class Location(db.Model): id = db.Column(db.Integer, primary_key = True) longitude = db.Column(db.Numeric(10,8)) latitude = db.Column(db.Numeric(10,8)) + loc_type = db.Column(db.String(200)) + message = db.Column(db.String(4000)) + audio = db.Column(db.String(255)) # title = db.Column(db.String(255)) # file = db.Column(db.String(255)) @@ -50,9 +53,12 @@ class Location(db.Model): # who = db.Column(db.String(255)) - def __init__(self, longitude, latitude): + def __init__(self, longitude, latitude, loc_type, message, audio): self.longitude = longitude self.latitude = latitude + self.loc_type = loc_type + self.message = message + self.audio = audio # def __repr__(self): # return '
Currently in the library |
- - |
---|---|
Titles: | -{{ books_all }} | -
Authors: | -{{ authors_all }} | -
Categories: | -{{ categories|replace('[', '')|replace(']', '') }} | -
Stacks: | -{{ stacks_all|replace('[', '')|replace(']', '') }} | -
From the years: | -{{earliest}} –– {{latest}} | -
Gaps in the collection: | -At least {{ books_potential }} potential books missing | -