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

8 lines
331 B
Python
Executable file

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