mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Allow Page editor to write HTML directly (#1915)
* Works on #1493 * Adds a new column for Pages to specify format * Separate out `build_html` into `build_html` and `build_markdown` * Add config variables into pages: `ctf_name`, `ctf_description`, `ctf_start`, `ctf_end`, `ctf_freeze` * The time variables are represented as ISO8601 timestamps
This commit is contained in:
28
migrations/versions/07dfbe5e1edc_add_format_to_pages.py
Normal file
28
migrations/versions/07dfbe5e1edc_add_format_to_pages.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Add format to Pages
|
||||
|
||||
Revision ID: 07dfbe5e1edc
|
||||
Revises: 75e8ab9a0014
|
||||
Create Date: 2021-06-15 19:57:37.410152
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "07dfbe5e1edc"
|
||||
down_revision = "75e8ab9a0014"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("pages", sa.Column("format", sa.String(length=80), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("pages", "format")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user