diff --git a/app/main/routes.py b/app/main/routes.py index 3e996a30..4af5798f 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -303,10 +303,6 @@ def list_files(directory): @bp.route('/test') def test(): - x = recently_upvoted_posts(1) - - return x - md = "::: spoiler I'm all for ya having fun and your right to hurt yourself.\n\nI am a former racer, commuter, and professional Buyer for a chain of bike shops. I'm also disabled from the crash involving the 6th and 7th cars that have hit me in the last 170k+ miles of riding. I only barely survived what I simplify as a \"broken neck and back.\" Cars making U-turns are what will get you if you ride long enough, \n\nespecially commuting. It will look like just another person turning in front of you, you'll compensate like usual, and before your brain can even register what is really happening, what was your normal escape route will close and you're going to crash really hard. It is the only kind of crash that your intuition is useless against.\n:::" return markdown_to_html(md) diff --git a/app/models.py b/app/models.py index fbc40990..30f2506a 100644 --- a/app/models.py +++ b/app/models.py @@ -1278,6 +1278,7 @@ class Site(db.Model): last_active = db.Column(db.DateTime, default=utcnow) log_activitypub_json = db.Column(db.Boolean, default=False) default_theme = db.Column(db.String(20), default='') + contact_email = db.Column(db.String(255), default='') @staticmethod def admins() -> List[User]: diff --git a/migrations/versions/91a931afd6d9_contact_email.py b/migrations/versions/91a931afd6d9_contact_email.py new file mode 100644 index 00000000..3e6555a3 --- /dev/null +++ b/migrations/versions/91a931afd6d9_contact_email.py @@ -0,0 +1,32 @@ +"""contact email + +Revision ID: 91a931afd6d9 +Revises: 08b3f718df5d +Create Date: 2024-04-12 16:22:32.137053 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '91a931afd6d9' +down_revision = '08b3f718df5d' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('site', schema=None) as batch_op: + batch_op.add_column(sa.Column('contact_email', sa.String(length=255), nullable=True)) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('site', schema=None) as batch_op: + batch_op.drop_column('contact_email') + + # ### end Alembic commands ###