mirror of https://gitlab.com/tildes/tildes.git
Celeo
6 years ago
committed by
Chad Birch
11 changed files with 135 additions and 11 deletions
-
24tildes/alembic/versions/347859b0355e_added_account_default_theme_setting.py
-
18tildes/scss/modules/_form.scss
-
16tildes/static/js/behaviors/theme-selector.js
-
10tildes/tests/conftest.py
-
7tildes/tests/webtests/test_user_settings.py
-
1tildes/tildes/models/user/user.py
-
2tildes/tildes/templates/base.jinja2
-
2tildes/tildes/templates/base_no_sidebar.jinja2
-
27tildes/tildes/templates/settings.jinja2
-
16tildes/tildes/views/api/web/user.py
-
11tildes/tildes/views/settings.py
@ -0,0 +1,24 @@ |
|||
"""Added account default theme setting |
|||
|
|||
Revision ID: 347859b0355e |
|||
Revises: 3fbddcba0e3b |
|||
Create Date: 2018-08-11 16:23:13.297883 |
|||
|
|||
""" |
|||
from alembic import op |
|||
import sqlalchemy as sa |
|||
|
|||
|
|||
# revision identifiers, used by Alembic. |
|||
revision = "347859b0355e" |
|||
down_revision = "3fbddcba0e3b" |
|||
branch_labels = None |
|||
depends_on = None |
|||
|
|||
|
|||
def upgrade(): |
|||
op.add_column("users", sa.Column("theme_default", sa.Text())) |
|||
|
|||
|
|||
def downgrade(): |
|||
op.drop_column("users", "theme_default") |
@ -0,0 +1,7 @@ |
|||
def test_render_theme_options(webtest): |
|||
"""Test that theme settings are being rendered.""" |
|||
settings = webtest.get("/settings") |
|||
assert settings.status_int == 200 |
|||
assert settings.text.count("(site and account default)") == 1 |
|||
assert "(site default)" not in settings.text |
|||
assert "(account default)" not in settings.text |
Write
Preview
Loading…
Cancel
Save
Reference in new issue