It allows users to browse and purchase products across various categories.
To run the project locally using Docker Compose, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/HappyGuyTime/megano.git cd megano
-
Create a
.env
file in the project root directory with the required environment variables. Here's an example:SECRET_KEY=your-secret-key DEBUG=1
-
Build and start the Docker containers.
docker-compose up -d --build
-
Apply migrations to set up the required tables.
docker-compose exec megano python manage.py migrate
-
Add product data to the database if it's not available.
docker-compose exec megano python manage.py create_data
-
The development server should now be running. Open your web browser and navigate to http://localhost:8000/ to access the project.
-
If you are deploying to a server and want to access the application using its IP address, make sure to add the IP address to the
ALLOWED_HOSTS
list in thesettings.py
file of the Django project:# config/settings.py ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'your_server_ip']
MEGANO project uses the following dependencies:
- Python
- Django
- Django REST framework
- Pillow
- Gunicorn
- Django-filter
The project also includes several development tools for code formatting and linting:
- Black
- Flake8
- Isort
You can find the specific versions in the pyproject.toml file.
The project follows the standard Django project structure. The main components include:
products
: Contains models, views, and serializers for products and categories.profiles
: Manages user profiles and authentication.orders
: Handles order creation, processing, and payment.frontend
: The frontend application for MEGANO.