You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I simply want to have a dropdown with country and save its code to neo4j as a string property. I am able to generate the drop down but it doesn't match what I want to achieve.
models.py
COUNTRY_CODE1=[("AF", 'Afghanistan'), ('BL', 'Albania'), ('DZ', 'Algeria')]
class Person(DjangoNode):
uid_person = UniqueIdProperty()
ind_name = StringProperty(max_length=100 , label='Enter your First Name',required=True)
ind_last_name = StringProperty(max_length=100,null=True, label='Last Name',required=True)
ind_nationality = StringProperty(max_length=2,choices=COUNTRY_CODE1,label='Nationality',required=True)
class Meta:
app_label = 'reg'
I have two problems here . First one being the dropdown is incomplete I am assuming it should display
<option value="AF">Afghanistan</option>
Second problem is that when I try to save it throws an error invalid choice with whatever option selected.
I am able to successfully save it without dropdown choices just the first two fields.
The text was updated successfully, but these errors were encountered:
whatSocks
changed the title
I am trying to implement choices with Django framework but am not able to get the correct values appearing.
implement choices with Django framework
Jul 6, 2021
whatSocks
changed the title
implement choices with Django framework
[Admin] implement choices with Django framework
Jul 27, 2021
I simply want to have a dropdown with country and save its code to neo4j as a string property. I am able to generate the drop down but it doesn't match what I want to achieve.
models.py
forms.py
views.py
html template - using bootstrap4.
My output shows that for the choices appears like this.
I have two problems here . First one being the dropdown is incomplete I am assuming it should display
Second problem is that when I try to save it throws an error invalid choice with whatever option selected.
I am able to successfully save it without dropdown choices just the first two fields.
The text was updated successfully, but these errors were encountered: