javascript - Create with inline in Django -


i have 2 related models train , passenger in django 1.7.

the passenger model has foreignkey train.

i want make view create passengers , choose in train passenger should placed. problem train exists , other times needs created.

how can in same view?

i think both need <select> element choose train , input elements create train. if option selected in <select> element input fields createing train disabled javascript.

is best approach problem?

i make form creating train in view , select train list, updating select train list if new train created aswell inputs/dropdowns/checkboxes passangers.

note creating train form should ajax call.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -