THIS IS A SAMPLE SOURCE CODE FOR AN ONLINE SHOPPING SITE DEVELOPED USING PYTHON ※ IT CAN BE USE JAPANESE ONLY SRY :(
ご覧いただきありがとうございます。 このリポジトリは、Pythonを使用して開発されたオンライン通販サイトのソースコードとインストーラーを提供します。 このアプリケーションは、ユーザーが商品を閲覧、検索、カートに追加、注文、レビューを投稿できる機能を備えています。 管理者は、商品の管理、注文の処理、ユーザーの管理などを行うことができます。
- OS: Windows 11
- Python: 3.12.1
- 必要なパッケージ
- Flask==2.1.0
- Flask-SQLAlchemy==2.5.1
- Flask-Migrate==3.1.0
- Flask-Login==0.5.0
- Flask-WTF==0.15.1
- Werkzeug==2.0.3
- SQLAlchemy==1.4.32
- WTForms==2.3.3
- app/: アプリケーションのメインディレクトリ
- templates/: HTMLテンプレートファイル
- static/: 静的ファイル(CSS、画像など)
- models.py: データベースモデルの定義
- forms.py: フォームの定義
- routes.py: ルーティングとビューの定義
- init.py: アプリケーションの初期化
- migrations/: データベースマイグレーションファイル
- config.py: アプリケーション設定ファイル
- requirements.txt: 必要なPythonパッケージのリスト
- run.py: アプリケーションのエントリーポイント
- setup.bat: セットアップと起動用のバッチファイル
- Shopping-Setup.exe: アプリケーションのインストーラー
- Shopping-Setup.exeをダブルクリックしてインストーラーを起動します。
- インストール先のディレクトリを選択し、インストールを進めます。
- インストールが完了したら、デスクトップまたはスタートメニューからアプリケーションを起動します。
- デスクトップまたはスタートメニューにあるShoppingアイコンをダブルクリックします。
- アプリケーションが起動し、自動的に仮想環境の作成、依存関係のインストール、データベースのセットアップが行われます。
- セットアップが完了すると、Webブラウザが開き、通販サイトのトップページが表示されます。
- ユーザー登録またはログインを行い、商品の閲覧、検索、カートへの追加、注文、レビューの投稿などの機能を利用できます。
- 管理者アカウントでログインすると、管理者用の機能(商品管理、注文管理、ユーザー管理など)にアクセスできます。(ID:admin, Password:admin)
- コマンドプロンプトから仮想環境を立ち上げます。
python -m venv [仮想環境名]
[仮想環境名]\scripts\activate
- 必要なPythonライブラリをインストールします。
pip install -r requirements.txt
- データベースの初期化をします。
flask db init
- データベースのマイグレーションをします。
flask db migrate
- アプリケーションを起動します。
flask run
- Flask公式ドキュメント
- SQLAlchemy公式ドキュメント
- Flask-SQLAlchemy公式ドキュメント
- Flask-Migrate公式ドキュメント
- Flask-Login公式ドキュメント
- Flask-WTF公式ドキュメント
Thank you for visiting. This repository provides the source code and installer for an online shopping site developed using Python. The application provides the ability for users to browse, search, add products to cart, place orders, and post reviews. Administrators can manage products, process orders, and manage users.
- OS: Windows 11
- Python: 3.12.1
- Required packages
- Flask==2.1.0
- Flask-SQLAlchemy==2.5.1
- Flask-Migrate==3.1.0
- Flask-Login==0.5.0
- Flask-WTF==0.15.1
- Werkzeug==2.0.3
- SQLAlchemy==1.4.32
- WTForms==2.3.3
- app/: Main application directory
- templates/: HTML template files
- static/: Static files (CSS, images, etc.)
- models.py: Database model definitions
- forms.py: Form definitions
- routes.py: Routing and view definitions
- init.py: Application initialization
- migrations/: Database migration files
- config.py: Application configuration file
- requirements.txt: List of required Python packages
- run.py: Application entry point
- setup.bat: Setup and launch batch file
- Shopping-Setup.exe: Application installer
- Double-click on Shopping-Setup.exe to launch the installer.
- Select the installation directory and proceed with the installation.
- Once the installation is complete, launch the application from the desktop or start menu.
- Double-click on the Shopping icon on the desktop or in the start menu.
- The application will start and automatically create a virtual environment, install dependencies, and set up the database.
- Once the setup is complete, a web browser will open, and the top page of the shopping site will be displayed.
- Register as a user or log in to access features such as browsing products, searching, adding to cart, placing orders, and posting reviews.
- Logging in with an administrator account will grant access to admin features (product management, order management, user management, etc.).
- 作成者: xM1guel
- GitHub: https://github.com/xM1guel
- Zenn: https://zenn.dev/miguel