oacpl/newsletters/views.py

9 lines
237 B
Python
Raw Normal View History

2017-08-18 21:25:17 -04:00
from django.shortcuts import render
2017-09-03 17:02:57 -04:00
from .models import Newsletter
def newsletters(request):
2017-09-03 17:08:25 -04:00
newsletters = Newsletter.objects.all().order_by('-publish')
2017-09-03 17:02:57 -04:00
return render(request, 'newsletters.html', {'newsletters': newsletters})