ginalamp / TCGPlayer

Beta store for TCG player whereby sellers can upload MTG cards to sell, and buyers can sell MTG cards
1 stars 0 forks source link
card-game django mtg-cards store

GET MTG

TCGPlayer is, in part, an online store for the resale of trading card game (TCG) cards. This project involved creating a beta store for TCGPlayer whereby sellers can upload cards to sell, and buyers can buy cards. We rebranded the store to "GET MTG", as the project uses data from the TCG brand "Magic: The Gathering" (MTG), and our founding members are Gina, Emma, and Tristan.

Group members

Demo

Click here to see a basic demo of the website.

Usage

Set up virtual environment & requirements

python3 -m virtualenv env
source env/bin/activate
pip3 install -r requirements.txt

Set up database

Before completing the next steps, unzip the all-cards-20211014091110-sample.zip file in src/. This data was retrieved from Scryfall on the 14th of October 2021, and can be replaced with a newer version downloaded from the website (just remember to update the file path argument shown below if you do this).

Then migrate the models.

cd src
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py shell

Import the data to the database in your python shell.

from tcgplaya import utils
utils.parse_bulk_data("all-cards-20211014091110-sample.json")

Run server

Exit the shell and then run the server.

python3 manage.py runserver

This will direct you to the home page:

image

Functionality

Login & Registration (user authentication)

The user is directed to registration if they are not logged in and try to access functionality that is only available to logged in users (Cart, My Listings, Profile, Card - add card listing, Card Listing - add to cart)

Cards (home page)

Marketplace

Cart

My Listings

Profile

Admin

Admin (created through Django's python3 manage.py createsuperuser) has access to a platform where they have CRUD privileges for all of the above as well as seeing important metrics (such as how many users, cards, card listings, etc. there are). They can log in by going to localhost:8000/admin.

Our Tech Stack

image