Answers for "medium style bootstrap templates"

0

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)
Posted by: Guest on May-03-2020

Browse Popular Code Answers by Language