Django Project 6 Getting Data From HTML Page and Display

preview_player
Показать описание
Welcome to official tech

=======================================
The CSRF middleware and template tag provides easy-to-use protection against Cross Site Request Forgeries. This type of attack occurs when a malicious website contains a link, a form button or some JavaScript that is intended to perform some action on your website, using the credentials of a logged-in user who visits the malicious site in their browser. A related type of attack, ‘login CSRF’, where an attacking site tricks a user’s browser into logging into a site with someone else’s credentials, is also covered.

The first defense against CSRF attacks is to ensure that GET requests are side effect free. Requests via ‘unsafe’ methods, such as POST, PUT, and DELETE, can then be protected by following the steps below.

----------------------------------------------------------------------------
----------------------------------------------------------------------------
"""project6 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
Examples:
Function views
1. Add an import: from my_app import views
Class-based views
Including another URLconf
"""

from app6 import views
urlpatterns = [
]

------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

# Create your views here.

def indexPage(request):

def details(request):
name = request.POST.get('n')
age = request.POST.get('a')
contact = request.POST.get('c')

d = {
"key1": name, "key2": age, "key3": contact
}

--------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

what if we have to show data on same page

kapilsharma
welcome to shbcf.ru