Forming a form

Today we tried creating a form in Django. It is pretty straightforward.

Also added JavaScript to the template of the form itself. Everything that we create in forms.py with forms module is converted into HTML so we can directly access the IDs of those fields.

Right now our fields are disabled and enabled correctly but we have not yet found a perfect solution to directly access database from the JS. We might not even have to.

There are two options we found to achieve this dependent selection:

  1. jQuery
  2. AJAX
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s