mtg-web/decks/views.py

11 lines
371 B
Python
Raw Normal View History

2010-08-26 03:43:19 +00:00
from django.shortcuts import render_to_response
import mtgweb.lib.mtg.mtg as mtg
import mtgweb.lib.mtg.database as database
def index(request):
db = database.TextDB('mtgweb/lib/mtg/db.txt')
deck = mtg.Deck()
print db.getCard('Forest')
deck.load('mtgweb/lib/mtg/decks/WhiteBeast.txt', db)
return render_to_response('decks/index.html', {'deck': deck})