Django - how to have dependent select fields manually

dev-jim

I am new in django (and python as well).

I want to have a dependent select field for state and city in admin . I know the feature Grouped Selects in django smart selects can do this. But this method render the options from the database which is not what I looking for.

I have the dependent data from the external source (json format), and using javascript to populate the regarding data.

So, how do I create the select field and add a class to it (for js selector)? should I create a empty text field and using js to convert it to select field?

Thanks

Francis Yaconiello

I would consider using django autocomplete light, it is a fairly solid select-field chaining tool that is good for both model relationships and remote data sources.

This is a link to the documentation for the remote data integration. http://django-autocomplete-light.readthedocs.org/en/latest/remote.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Dependent fields in Django

From Dev

Django dependent select

From Dev

Defining dependent Django Model Fields

From Dev

Best approach for loading dependent select fields in page

From Dev

How to revalidate a form with multiple dependent fields?

From Dev

How to create 2 dependent dynamic fields in OTRS

From Dev

How to create a form with dependent fields? (RoR)

From Dev

Loading Dependent Assemblies Manually

From Dev

how to have a build-dependent icon in Delphi

From Dev

Django - How to get count for select fields in model within same dictionary

From Dev

Manually select location, how to implement?

From Dev

In Django is it okay to have models of two different apps dependent of each other?

From Dev

How to manually trigger a search and then select the first option manually in jQueryUI autocomplete?

From Java

How can I validate dynamically added dependent calendar fields

From Dev

zf2 validation: How can I validate dependent fields?

From Dev

How to order by fields in Django

From Dev

How to have array of fields with names?

From Dev

Kendo DropDownList - how to manually select an item?

From Dev

How to have an argument possible values dependent on another argument with IPython Widgets?

From Dev

How to send django exception log manually?

From Dev

How to manually create a SocialApp with django allauth?

From Dev

How to manually create a SocialApp with django allauth?

From Dev

How to manually render a part of a django form

From Dev

How to manually make queries into the DB using Django?

From Dev

Adding custom select fields to a Django query

From Dev

How to select fields of a contained association?

From Dev

How to sed to select two fields

From Dev

How to select multiple fields (LINQ)

From Dev

How to use manually created fields in the same query with mysql?

Related Related

  1. 1

    Dependent fields in Django

  2. 2

    Django dependent select

  3. 3

    Defining dependent Django Model Fields

  4. 4

    Best approach for loading dependent select fields in page

  5. 5

    How to revalidate a form with multiple dependent fields?

  6. 6

    How to create 2 dependent dynamic fields in OTRS

  7. 7

    How to create a form with dependent fields? (RoR)

  8. 8

    Loading Dependent Assemblies Manually

  9. 9

    how to have a build-dependent icon in Delphi

  10. 10

    Django - How to get count for select fields in model within same dictionary

  11. 11

    Manually select location, how to implement?

  12. 12

    In Django is it okay to have models of two different apps dependent of each other?

  13. 13

    How to manually trigger a search and then select the first option manually in jQueryUI autocomplete?

  14. 14

    How can I validate dynamically added dependent calendar fields

  15. 15

    zf2 validation: How can I validate dependent fields?

  16. 16

    How to order by fields in Django

  17. 17

    How to have array of fields with names?

  18. 18

    Kendo DropDownList - how to manually select an item?

  19. 19

    How to have an argument possible values dependent on another argument with IPython Widgets?

  20. 20

    How to send django exception log manually?

  21. 21

    How to manually create a SocialApp with django allauth?

  22. 22

    How to manually create a SocialApp with django allauth?

  23. 23

    How to manually render a part of a django form

  24. 24

    How to manually make queries into the DB using Django?

  25. 25

    Adding custom select fields to a Django query

  26. 26

    How to select fields of a contained association?

  27. 27

    How to sed to select two fields

  28. 28

    How to select multiple fields (LINQ)

  29. 29

    How to use manually created fields in the same query with mysql?

HotTag

Archive