Skip to content

About

full-stack medieval-themed auction web app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Medieval Auctions


Overview

Medieval Auctions is a full-stack auction web application inspired by eBay, set in a medieval fantasy theme. Built with Django, Python, HTML, CSS, and SQLite, the app allows users to create listings, place bids, manage a watchlist, leave comments, and close auctions.


Features

  • Active Listings: Browse all open auction listings with title, price, description, and image.
  • Create Listing: Authenticated users can post new auction items with a title, description, starting bid, optional image URL, and category.
  • Bidding: Users can place bids on listings. Bids must meet or exceed the starting price and current highest bid. The listing price updates in real time.
  • Watchlist: Users can add or remove listings from a personal watchlist, accessible from the navigation bar.
  • Close Auction: Sellers can close their own auctions. The highest bidder is automatically marked as the winner and notified.
  • Comments: Authenticated users can leave comments on any listing.
  • Categories: Listings are organized by category. Clicking a category displays all listings within it.
  • Django Admin: Site administrators can manage listings, users, bids, comments, and categories via the Django admin panel.

Tech Stack

  • Backend: Python, Django
  • Frontend: HTML, CSS, Bootstrap
  • Database: SQLite
  • Authentication: Django's built-in auth system

File Structure

commerce/
├── auctions/
│   ├── static/auctions/
│   │   └── styles.css
│   ├── templates/auctions/
│   │   ├── layout.html
│   │   ├── index.html
│   │   ├── listing.html
│   │   ├── create.html
│   │   ├── watchlist.html
│   │   ├── categories.html
│   │   ├── category_listings.html
│   │   ├── login.html
│   │   └── register.html
│   ├── admin.py
│   ├── models.py
│   ├── urls.py
│   └── views.py
├── commerce/
│   ├── settings.py
│   └── urls.py
└── manage.py

Models

  • User — Extends Django's AbstractUser. Includes a ManyToMany watchlist field linking to Listing.
  • Category — Stores listing categories (e.g. Weapons, Armor, Food & Drink).
  • Listing — Stores title, description, price, image URL, category, seller, closed status, and winner.
  • Bid — Stores bid amount, the listing it belongs to, and the buyer.
  • Comment — Stores comment text, the listing it belongs to, and the author.

How to Run Locally

  1. Clone the repository:

    git clone https://github.com/yourusername/commerce.git
    cd commerce
    
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install dependencies:

    pip install django
    
  4. Run migrations:

    python manage.py makemigrations
    python manage.py migrate
    
  5. Create a superuser (for Django admin access):

    python manage.py createsuperuser
    
  6. Start the development server:

    python manage.py runserver
    
  7. Open a browser and navigate to: http://127.0.0.1:8000

  8. Access the admin panel at: http://127.0.0.1:8000/admin Use this to add categories before creating listings.


Usage Notes

  • To start with a fresh database, delete db.sqlite3 and rerun python manage.py migrate followed by python manage.py createsuperuser.
  • Categories must be created via the Django admin panel before they appear in the Create Listing dropdown.
  • Only the seller of a listing can close its auction.
  • Sellers cannot bid on their own listings.
  • The winning bidder is notified with a message when they visit the listing page after the auction is closed.

Credits


Medieval Auctions — CS50W Project 2

About

full-stack medieval-themed auction web app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages