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