How to call parts of my html template in django?

3

Do I want to call parts of my html template in my view?

something like this

$ ticket_date = $ this- > input-> post ('ticket_date'); in php,

but I do not know how to do it.

Someone knows, please help me

    
asked by user12740 12.08.2016 в 20:54
source

1 answer

2

To access the POST object from the views you must use the request object that your view receives. There all the variables are packaged in a dictionary.

#archivo views.py

def tu_vista(request):
    fecha_ingreso = request.POST.get('fecha_ingreso', 'valor por default')
    
answered by 15.08.2016 в 23:11