mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
contact email field in DB #151
This commit is contained in:
parent
5e20658474
commit
e135cf735f
3 changed files with 33 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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]:
|
||||
|
|
32
migrations/versions/91a931afd6d9_contact_email.py
Normal file
32
migrations/versions/91a931afd6d9_contact_email.py
Normal file
|
@ -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 ###
|
Loading…
Reference in a new issue