TrainsFilter is a core microservice of the Travel-Booking-Framework that provides an advanced search and filtering system for Trains. This service is developed using Django and Elasticsearch, allowing for fast and efficient Train searches based on multiple criteria.
- Train Search: Search Trains based on origin, destination, date, and other parameters.
- Advanced Filters: Filter Trains by price, duration, departure time, and other factors.
- Train Management: Add, update, and delete Train information.
- Python 3.x
- Django
- Elasticsearch
-
Clone the Repository:
git clone https://github.com/Travel-Booking-Framework/TrainsFilter.git cd TrainsFilter -
Create and Activate a Virtual Environment:
python3 -m venv venv source venv/bin/activate # On Windows use: venv\\Scripts\\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Setup Elasticsearch: Ensure that Elasticsearch is installed and running on your system. Update the Django settings (
settings.py) with the correct Elasticsearch configuration.
- TFilter/: Contains the core settings and configurations for Django.
- TrainsFilter/: Manages Train-related operations and filtering functionalities.
- Class-Diagram/: Provides class diagrams for understanding the project architecture.
- logs/: Contains logs files.
We welcome contributions from the community! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Submit a Pull Request.
-
Create a Superuser: To create an admin account, use the command:
python manage.py createsuperuser
-
GraphQL Support: This project includes GraphQL capabilities, which can be accessed at
/graphql/.