python - Django dropdown only using the django widget form passing selected item -


hi want create dropdown menu django forms. know default using select widget.

class privacyform(forms.form):     visibility =forms.choicefield(required=true,choices=posts.post_privacy_choices, initial=1)      post_privacy_choices = (       (1, 'public'),       ('ofo', 'only followers'),       ('om', 'only me'),  )   

ok normal dropdown choices. when change dropdown me or followers want call function given selected argument , preferable function in views.py , want choice saved not default. know there

widget=forms.select(attrs={"onchange":'refresh()') 

, dont find in django docs , not seem work. hope can me.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -