mtg-web/cards/views.py

9 lines
331 B
Python
Raw Normal View History

2010-08-26 03:43:19 +00:00
# Create your views here.
from django.shortcuts import render_to_response
import mtgweb.lib.mtg.database as database
def display(request, name):
db = database.TextDB('/home/correlr/code/mtgweb/lib/mtg/db.txt')
card = db.getCard(name.replace('_', ' ').strip())
return render_to_response('cards/view.html', {'card': card})