Add a signup field to domains
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
{{ macros.form_field(form.max_quota_bytes, step=1000000000, max=50000000000,
|
{{ macros.form_field(form.max_quota_bytes, step=1000000000, max=50000000000,
|
||||||
prepend='<span class="input-group-addon"><span id="quota">'+((form.max_quota_bytes.data//1000000000).__str__() if form.max_quota_bytes.data else '∞')+'</span> GiB</span>',
|
prepend='<span class="input-group-addon"><span id="quota">'+((form.max_quota_bytes.data//1000000000).__str__() if form.max_quota_bytes.data else '∞')+'</span> GiB</span>',
|
||||||
oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }}
|
oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }}
|
||||||
|
{{ macros.form_field(form.signup_enabled) }}
|
||||||
{{ macros.form_field(form.comment) }}
|
{{ macros.form_field(form.comment) }}
|
||||||
{{ macros.form_field(form.submit) }}
|
{{ macros.form_field(form.submit) }}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
24
core/admin/migrations/versions/423155f8fc15_.py
Normal file
24
core/admin/migrations/versions/423155f8fc15_.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
""" Enable signup per domain
|
||||||
|
|
||||||
|
Revision ID: 423155f8fc15
|
||||||
|
Revises: 77aa22ad72e2
|
||||||
|
Create Date: 2017-12-02 15:07:40.052320
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '423155f8fc15'
|
||||||
|
down_revision = '77aa22ad72e2'
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
with op.batch_alter_table('domain') as batch:
|
||||||
|
batch.add_column(sa.Column('signup_enabled', sa.Boolean(), nullable=False, server_default=sa.sql.expression.false()))
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
with op.batch_alter_table('domain') as batch:
|
||||||
|
batch.drop_column('signup_enabled')
|
||||||
Reference in New Issue
Block a user