diff --git a/.github/workflows/master_bootstrap-flask-example.yml b/.github/workflows/master_bootstrap-flask-example.yml new file mode 100644 index 00000000..6a189e96 --- /dev/null +++ b/.github/workflows/master_bootstrap-flask-example.yml @@ -0,0 +1,65 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - bootstrap-flask-example + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.11' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: | + pip install -r examples/requirements.txt + cp examples/requirements.txt examples/bootstrap5/requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + ./examples/bootstrap5/ + !venv/ + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'bootstrap-flask-example' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_EA24F62410C243EEA4968476E7017059 }} diff --git a/CHANGES.rst b/CHANGES.rst index 24bc3ba4..63db6d7d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,22 @@ Release date: - Release date: - + +2.3.2 +----- + +Release date: 2023/10/11 + +- Fix the incorrect JS file integrity value. + + +2.3.1 +----- + +Release date: 2023/10/11 + - Upgrade to Bootstrap 5.3.2, Bootswatch 5.3.1, and Bootstrap Icons 1.11.1. +- Set up the Azure web app for the example application. 2.3.0 @@ -327,4 +342,4 @@ Release date: 2018/7/1 Release date: 2018/6/11 -Initial release. +Initial release. \ No newline at end of file diff --git a/README.md b/README.md index 6cb68aab..d101b547 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,7 @@ docs for more details. ## Live demo -Live demos of the latest release are: -- [Examples with Bootstrap 4](http://173.212.198.217/) -- [Examples with Bootstrap 5](http://109.205.179.12/) +https://bootstrap-flask-example.azurewebsites.net/ ## Donate diff --git a/docs/conf.py b/docs/conf.py index 620183c5..7760d5b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,9 +19,9 @@ # -- Project information ----------------------------------------------------- -project = u'Bootstrap-Flask' -copyright = u'2017, Grey Li' -author = u'Grey Li' +project = 'Bootstrap-Flask' +copyright = '2017, Grey Li' +author = 'Grey Li' version, release = get_version('Bootstrap-Flask') @@ -63,7 +63,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' @@ -107,8 +107,8 @@ # Output file base name for HTML help builder. htmlhelp_basename = 'Bootstrap-Flaskdoc' -html_favicon = "_static/bootstrap-flask-favicon.png" -html_logo = "_static/bootstrap-flask-logo.png" +html_favicon = '_static/bootstrap-flask-favicon.png' +html_logo = '_static/bootstrap-flask-logo.png' html_css_files = [ 'css/custom.css', @@ -137,8 +137,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'Bootstrap-Flask.tex', u'Bootstrap-Flask Documentation', - u'Grey Li', 'manual'), + (master_doc, 'Bootstrap-Flask.tex', 'Bootstrap-Flask Documentation', + 'Grey Li', 'manual'), ] @@ -147,7 +147,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'bootstrap-flask', u'Bootstrap-Flask Documentation', + (master_doc, 'bootstrap-flask', 'Bootstrap-Flask Documentation', [author], 1) ] @@ -158,7 +158,7 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'Bootstrap-Flask', u'Bootstrap-Flask Documentation', + (master_doc, 'Bootstrap-Flask', 'Bootstrap-Flask Documentation', author, 'Bootstrap-Flask', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/macros.rst b/docs/macros.rst index 23d68492..63f13dbd 100644 --- a/docs/macros.rst +++ b/docs/macros.rst @@ -576,7 +576,7 @@ Here is the full example: {{ render_table(data, view_url=('view_message', [('message_id', ':id')])) }} -The following arguments are expect to accpet an URL tuple: +The following arguments are expected to accept a URL tuple: - ``custom_actions`` - ``view_url`` diff --git a/examples/README.rst b/examples/README.rst index b290342d..27d0ee48 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -6,9 +6,8 @@ Type these commands in the terminal: .. code-block:: bash $ git clone https://github.com/helloflask/bootstrap-flask.git - $ cd bootstrap-flask - $ pip install -r requirements/examples.txt - $ cd examples + $ cd bootstrap-flask/examples + $ pip install -r requirements.txt Then based on the Bootstrap version you want to use to run the application. @@ -26,10 +25,8 @@ Bootstrap 5: Now go to http://localhost:5000. -Live demos of the latest release are: +Live demos for the example application: https://bootstrap-flask-example.azurewebsites.net/ -- `Examples with Bootstrap 4 `_ -- `Examples with Bootstrap 5 `_ Overview of icons ----------------- diff --git a/examples/bootstrap4/app.py b/examples/bootstrap4/app.py index ac7e7207..2a3bbd59 100644 --- a/examples/bootstrap4/app.py +++ b/examples/bootstrap4/app.py @@ -36,6 +36,7 @@ class ExampleForm(FlaskForm): datetime_local = DateTimeLocalField() time = TimeField() month = MonthField() + color = ColorField() floating = FloatField() integer = IntegerField() decimal_slider = DecimalRangeField() diff --git a/examples/bootstrap4/templates/form.html b/examples/bootstrap4/templates/form.html index 9b4f0449..aa76474d 100644 --- a/examples/bootstrap4/templates/form.html +++ b/examples/bootstrap4/templates/form.html @@ -11,6 +11,7 @@

Example Form

datetimelocal = DateTimeLocalField() time = TimeField() month = MonthField() + color = ColorField() floating = FloatField() integer = IntegerField() decimalslider = DecimalRangeField() diff --git a/examples/bootstrap5/app.py b/examples/bootstrap5/app.py index 60f9d7fb..acb85b23 100644 --- a/examples/bootstrap5/app.py +++ b/examples/bootstrap5/app.py @@ -36,6 +36,7 @@ class ExampleForm(FlaskForm): datetime_local = DateTimeLocalField() time = TimeField() month = MonthField() + color = ColorField() floating = FloatField() integer = IntegerField() decimal_slider = DecimalRangeField() diff --git a/examples/bootstrap5/templates/form.html b/examples/bootstrap5/templates/form.html index edbe65d3..b0b7b0a1 100644 --- a/examples/bootstrap5/templates/form.html +++ b/examples/bootstrap5/templates/form.html @@ -11,6 +11,7 @@

Example Form

datetimelocal = DateTimeLocalField() time = TimeField() month = MonthField() + color = ColorField() floating = FloatField() integer = IntegerField() decimalslider = DecimalRangeField() diff --git a/requirements/examples.in b/examples/requirements.txt similarity index 100% rename from requirements/examples.in rename to examples/requirements.txt diff --git a/flask_bootstrap/__init__.py b/flask_bootstrap/__init__.py index a71b8a64..a207af74 100644 --- a/flask_bootstrap/__init__.py +++ b/flask_bootstrap/__init__.py @@ -262,7 +262,7 @@ def create_app(): bootstrap_version = '5.3.2' popper_version = '2.11.8' bootstrap_css_integrity = 'sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' - bootstrap_js_integrity = 'sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL' + bootstrap_js_integrity = 'sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+' popper_integrity = 'sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r' popper_name = '@popperjs/core' static_folder = 'bootstrap5' diff --git a/requirements/dev.txt b/requirements/dev.txt index 6bef48d1..fe1d9ad6 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,39 +8,39 @@ -r docs.txt -r style.txt -r tests.txt -build==0.10.0 +build==1.0.3 # via pip-tools cachetools==5.3.1 # via tox -chardet==5.1.0 +chardet==5.2.0 # via tox colorama==0.4.6 # via tox distlib==0.3.7 # via virtualenv -filelock==3.12.2 +filelock==3.12.4 # via # tox # virtualenv pip-compile-multi==2.6.3 # via -r requirements/dev.in -pip-tools==7.1.0 +pip-tools==7.3.0 # via pip-compile-multi -platformdirs==3.9.1 +platformdirs==3.11.0 # via # tox # virtualenv -pyproject-api==1.5.3 +pyproject-api==1.6.1 # via tox pyproject-hooks==1.0.0 # via build toposort==1.10 # via pip-compile-multi -tox==4.6.4 +tox==4.11.3 # via -r requirements/dev.in -virtualenv==20.24.1 +virtualenv==20.24.5 # via tox -wheel==0.41.0 +wheel==0.41.2 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/docs.txt b/requirements/docs.txt index 640ec085..f60cd341 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -7,11 +7,11 @@ # alabaster==0.7.13 # via sphinx -babel==2.12.1 +babel==2.13.0 # via sphinx certifi==2023.7.22 # via requests -charset-normalizer==3.2.0 +charset-normalizer==3.3.0 # via requests docutils==0.20.1 # via sphinx @@ -23,36 +23,41 @@ jinja2==3.1.2 # via sphinx markupsafe==2.1.3 # via jinja2 -packaging==23.1 +packaging==23.2 # via # pallets-sphinx-themes # sphinx pallets-sphinx-themes==2.1.1 # via -r requirements/docs.in -pygments==2.15.1 +pygments==2.16.1 # via sphinx requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==7.0.1 +sphinx==7.2.6 # via # -r requirements/docs.in # pallets-sphinx-themes + # sphinxcontrib-applehelp + # sphinxcontrib-devhelp + # sphinxcontrib-htmlhelp # sphinxcontrib-log-cabinet -sphinxcontrib-applehelp==1.0.4 + # sphinxcontrib-qthelp + # sphinxcontrib-serializinghtml +sphinxcontrib-applehelp==1.0.7 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.5 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.4 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-log-cabinet==1.0.1 # via -r requirements/docs.in -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.6 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.9 # via sphinx -urllib3==2.0.4 +urllib3==2.0.6 # via requests diff --git a/requirements/examples.txt b/requirements/examples.txt deleted file mode 100644 index 76cbe6de..00000000 --- a/requirements/examples.txt +++ /dev/null @@ -1,46 +0,0 @@ -# SHA1:ffb35e11eb78fc6d03fa35f64989abeeee4280e2 -# -# This file is autogenerated by pip-compile-multi -# To update, run: -# -# pip-compile-multi -# -blinker==1.6.2 - # via flask -bootstrap-flask==2.2.0 - # via -r requirements/examples.in -click==8.1.6 - # via flask -flask==2.3.2 - # via - # -r requirements/examples.in - # bootstrap-flask - # flask-sqlalchemy - # flask-wtf -flask-sqlalchemy==3.0.5 - # via -r requirements/examples.in -flask-wtf==1.1.1 - # via -r requirements/examples.in -greenlet==2.0.2 - # via sqlalchemy -itsdangerous==2.1.2 - # via - # flask - # flask-wtf -jinja2==3.1.2 - # via flask -markupsafe==2.1.3 - # via - # jinja2 - # werkzeug - # wtforms -sqlalchemy==2.0.19 - # via flask-sqlalchemy -typing-extensions==4.7.1 - # via sqlalchemy -werkzeug==2.3.6 - # via flask -wtforms==3.0.1 - # via - # bootstrap-flask - # flask-wtf diff --git a/requirements/style.txt b/requirements/style.txt index 92cc95d5..5cedb992 100644 --- a/requirements/style.txt +++ b/requirements/style.txt @@ -5,11 +5,11 @@ # # pip-compile-multi # -flake8==6.0.0 +flake8==6.1.0 # via -r requirements/style.in mccabe==0.7.0 # via flake8 -pycodestyle==2.10.0 +pycodestyle==2.11.0 # via flake8 -pyflakes==3.0.1 +pyflakes==3.1.0 # via flake8 diff --git a/requirements/tests.txt b/requirements/tests.txt index c6619d91..52188e45 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -5,24 +5,22 @@ # # pip-compile-multi # -blinker==1.6.2 +blinker==1.6.3 # via flask -click==8.1.6 +click==8.1.7 # via flask -coverage[toml]==7.2.7 +coverage[toml]==7.3.2 # via pytest-cov -exceptiongroup==1.1.2 +exceptiongroup==1.1.3 # via pytest -flask==2.3.2 +flask==3.0.0 # via # flask-sqlalchemy # flask-wtf -flask-sqlalchemy==3.0.5 +flask-sqlalchemy==3.1.1 # via -r requirements/tests.in -flask-wtf==1.1.1 +flask-wtf==1.2.1 # via -r requirements/tests.in -greenlet==2.0.2 - # via sqlalchemy iniconfig==2.0.0 # via pytest itsdangerous==2.1.2 @@ -36,25 +34,25 @@ markupsafe==2.1.3 # jinja2 # werkzeug # wtforms -packaging==23.1 +packaging==23.2 # via pytest -pluggy==1.2.0 +pluggy==1.3.0 # via pytest -pytest==7.4.0 +pytest==7.4.2 # via # -r requirements/tests.in # pytest-cov pytest-cov==4.1.0 # via -r requirements/tests.in -sqlalchemy==2.0.19 +sqlalchemy==2.0.21 # via flask-sqlalchemy tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via sqlalchemy -werkzeug==2.3.6 +werkzeug==3.0.0 # via flask -wtforms==3.0.1 +wtforms==3.1.0 # via flask-wtf diff --git a/setup.py b/setup.py index 9c997093..0901ab81 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='Bootstrap-Flask', - version='2.3.1dev', + version='2.3.3-dev', url='https://github.com/helloflask/bootstrap-flask', project_urls={ 'Documentation': 'https://bootstrap-flask.readthedocs.io/en/stable/', diff --git a/tests/test_bootstrap4/test_render_form.py b/tests/test_bootstrap4/test_render_form.py index 863f399f..82fa738c 100644 --- a/tests/test_bootstrap4/test_render_form.py +++ b/tests/test_bootstrap4/test_render_form.py @@ -1,7 +1,7 @@ from flask import current_app, render_template_string from flask_wtf import FlaskForm -from wtforms import BooleanField, FileField, MultipleFileField,\ - PasswordField, RadioField, StringField, SubmitField, IntegerRangeField,\ +from wtforms import BooleanField, FileField, MultipleFileField, \ + PasswordField, RadioField, StringField, SubmitField, IntegerRangeField, \ DecimalRangeField from wtforms.validators import DataRequired from flask_bootstrap import SwitchField diff --git a/tests/test_bootstrap4/test_render_table.py b/tests/test_bootstrap4/test_render_table.py index 93337817..6fb3299b 100644 --- a/tests/test_bootstrap4/test_render_table.py +++ b/tests/test_bootstrap4/test_render_table.py @@ -64,7 +64,6 @@ def test(): response = client.get('/table') data = response.get_data(as_text=True) assert '' in data - print(data) assert '' in data assert '' in data assert '' in data diff --git a/tox.ini b/tox.ini index cbcd3edc..9672626a 100644 --- a/tox.ini +++ b/tox.ini @@ -31,4 +31,5 @@ commands = [testenv:docs] deps = -r requirements/docs.txt -commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html +commands = + sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
#Message1