mtg-web/decks/views.py
2010-08-25 23:43:46 -04:00

10 lines
371 B
Python
Executable file

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})