bootstrap templates medium code example
Example: medium style bootstrap templates
def index(request):
featured = Post.objects.filter(featured=True)
latest = Post.objects.order_by('-timestamp')[0:3]
if request.method == 'POST':
email = request.POST['email']
new_signup = SignUp() #object
new_signup.email = email
new_signup.save()
context = {
'object_list': featured,
'latest': latest
}
return render(request, 'index.html', context)