This is a sample Python project that uses Flask and MSSQL to build a web application.
(I stopped at level 3)
- Python 3.x:
- Microsoft SQL Server 2022
- ODBC Driver 17 for SQL SERVER
- Azure Data Studio or any DBMS:
- Clone the repository:
git clone https://github.com/daisuketanabe/flask_mssql_web_app.git
- Navigate to the project directory:
cd flask_mssql_web_app
- Create a virtual environment:
python -m venv venv
or
python3 -m venv venv
- Activate the virtual environment:
- Windows:
venv\Scripts\activate.bat
- Unix/Mac:
source venv/bin/activate
- Install dependencies:
python install.py
python3 install.py
- Create a database in MSSQL using DemoDB.sql file
- Update the database configuration in config.py with your MSSQL database details.
- Activate the virtual environment:
- Windows: env\Scripts\activate.bat
- Unix/Mac: source env/bin/activate
- Run the Flask app:
python app.py
or
python3 app.py
- Open your web browser and go to http://localhost:5000 to view the app.
- app.py: Main Flask application file.
- install.py: install dependencies.
- config.py: Configuration file for the app, including database details
- sample_config.py: Sample config.py file
- DemoDB.sql: Sample MSSQL Dump file.
- templates/: Directory containing HTML templates for the app.
- README.md: This file.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch: git checkout -b my-new-feature
- Make your changes and commit them: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request.
This project is licensed under the MIT License.