2/28/2023 0 Comments Bootstrap contact formBootstrap form validation is used in this form. In that case, you don't need to return context. This is an all-white contact form with a custom-styled button with a solid green color. Also note that this example makes an interesting usage of. You need to add something such as context to see the result or you can control the task with JavaScript. Heres a quality template for all your contact form needs, plus a little CSS to make it look better. You can see when rendering I'm returning something to my HTML which I want to see in that particular Html file. Views.py from django.http import HttpResponseįrom django.shortcuts import render, redirectįrom import EmailMessageĮmail=EmailMessage("Message from Django", Note that I have changed the email address and password for security purposes, but it is a Gmail account. When I click on the "Send" button, the page just reloads and nothing more happens, I don't get any email. I tried in the views with send_mail instead of EmailMessage, but it still does not work. I'm trying to make a Django contact form with Bootstrap styles, but it's not working.
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |