mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00

render_to_response does not work on newer django, so it needs to be replaced. And using a speicfic context actually overcomplicates things, it's easier to just use a wrapper function. For those cases where we don't need NavContext, just use render() (the new shortcut function from django), which also removes the need to use RequestContext.
10 lines
232 B
Python
10 lines
232 B
Python
from pgweb.util.contexts import render_pgweb
|
|
|
|
from models import Quote
|
|
|
|
def allquotes(request):
|
|
quotes = Quote.objects.filter(approved=True)
|
|
return render_pgweb(request, 'about', 'quotes/quotelist.html', {
|
|
'quotes': quotes,
|
|
})
|