13 lines
416 B
Python
13 lines
416 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})
|
|
|
|
def texts(request):
|
|
texts = PadmaText.objects.all()
|
|
return render_to_response("text_list.html", {'texts': texts})
|