padmatexts/padmaTexts/texts/views.py
2010-11-11 05:46:21 +05:30

9 lines
297 B
Python

# Create your views here.
from models import PadmaText
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render_to_response
def text(request, slug):
text = get_object_or_404(PadmaText, slug=slug)
return render_to_response("text_embed.html", {'text': text})