This project is developed using Python and Django Rest Framework. It includes various functionalities such as database migrations, static file collection, and user management.
The Auction Management System allows users to create, view, and bid on auctions. It includes features for managing auction details, bidding history, and user authentication.
- Python
- pip
-
Install the required packages:
pip3 install -r requirements.txt
-
Apply database migrations:
./manage.py makemigrations ./manage.py migrate
-
Create a superuser:
python3 manage.py createsuperuser --username admin --email admin@mail.com
-
Collect static files:
python3 manage.py collectstatic
- To start the development server:
python3 manage.py runserver
POST /api/v1/auction/bid
: Place a bid on an auction.GET /api/v1/auction/<auction_id>
: Retrieve auction details.GET /api/v1/auctions
: List all auctions.GET /api/v1/auctions/search
: Search auctions by name.GET /api/v1/auctions/top
: List top auctions.GET /api/v1/auctions/best-artist
: Get the artist with the highest number of auctions.
The project includes several database models such as Auction
, Bid
, User
, Category
, and more. These models are used to store and manage data related to auctions, bids, users, and categories.
The project uses Django Rest Framework serializers to convert complex data types, such as querysets and model instances, into native Python datatypes that can then be easily rendered into JSON, XML, or other content types.
The project includes various views to handle different API endpoints. These views are responsible for processing incoming requests, performing operations on the data, and returning appropriate responses.
The project uses Django Rest Framework's permission classes to control access to different parts of the application. For example, only authenticated users can place bids on auctions.
The project includes error handling mechanisms to ensure that appropriate error messages are returned when something goes wrong. For example, if a user tries to place a bid on an auction that does not exist or has ended, an error message is returned.
The project includes unit tests to ensure that the different parts of the application work as expected. These tests can be run using the following command:
pytest auction/tests/test_views.py
pytest auction/tests/test_models.py
Zokirjonova Muslima 24835737
This project is developed using Python and Django Rest Framework. It includes various functionalities such as database migrations, static file collection, and user management.
The Admin Panel allows users to manage auctions, bids, users, and categories. It includes features for creating, updating, and deleting records.