2016-07-17

I am new to python django so I cant figure out most of the things. I have to build a form where I take no. as input and accordingly draw lines through svg in html. I have made few files namely:

1) draw.html where I'll place the code to draw lines. it will be called upon form submission

2)fill_form.html (inside template folder) :-

< form method =' Get '>

{% csrf_token%}

{{ form.as_p}}

< input type =' submit ' value =' submit ' >

< / form >

3)submit_form.py

from django import forms

class.yard (forms.Forms):

var=forms.IntegerField ()

now I have to make changes in view.py and url.py . can someone please help me with that. Also please tell how to access the input var in draw.html
P.S. please be elaborate when answering. I'm using django 1.6. python 2.6
thanks in advance.

Show more