Reputation: 1281
Is there a way in Django to get the data from HTML without using django forms template
in html. The reason is we are two different Developers , one who works on Frontend ui design and the other django coder.
So if he just gives me html and css files, i won't be able to just use it, unless i add form template in HTML substituting his code.
i am wondering can just get the `POST' data without django forms.
Upvotes: 1
Views: 3570
Reputation: 15484
Of course you can get POST data easily by using:
def home(request):
if request.method == 'POST':
data = request.POST['variable']
where variable
is the field name.
Upvotes: 6