These are chat archives for django/django

27th
Oct 2018
cs89gr
@cs89gr
Oct 27 2018 13:58

hello i have a multiply html form and i want to take values from inputs step by step in my views.py..that where i realise is i cant take anythink if button have type="button" and not type="submit"...any idea how can i take inputs text in my views.py using for button type="button" ?

html form :

<form id="myForm" action='' method="POST" enctype="multipart/form-data">{% csrf_token %}
 <input type="text" name="fname" placeholder="First Name 3"/>
 <li><button name='n01' type="button" class="btn btn-primary next-step">Save and continue</button></li>
  <input type="text" name="fname1" placeholder="First Name 3"/>
  <li><button name='n02' type="button" class="btn btn-primary next-step">Save and continue</button></li>
   <input type="text" name="fname3" placeholder="First Name 3"/>
   <li><button name='n03' type="submit" class="btn btn-primary next-step">Save and continue</button></li>
 <form>

views.py :

         if request.method == 'POST' and 'n01' in request.POST:
            print 'ok'
Tanveer Ahmed
@tanveerobjects_twitter
Oct 27 2018 16:58
I want to know about Python Ecommerece or django Ecommerce Which one is better Oscar or Saleor? Please which one I choose to develop Ecommerece Website in Python & Django?
Ken
@sjkenstone
Oct 27 2018 21:00
@tanveerobjects_twitter Saleor