Chaining county/cites api to models

71 views
Skip to first unread message

Heman Okumbo

unread,
May 5, 2022, 11:47:17 AM5/5/22
to django...@googlegroups.com
I need to have clients posting their products based on their countries,States and cities.I got this api that show a drop down list based on country, states and cities.How do I chain my models to this api? Any leads will be appreciated.Thanks

Muhammad Juwaini Abdul Rahman

unread,
May 5, 2022, 9:04:59 PM5/5/22
to django...@googlegroups.com

On Thu, 5 May 2022 at 23:46, Heman Okumbo <heman...@gmail.com> wrote:
I need to have clients posting their products based on their countries,States and cities.I got this api that show a drop down list based on country, states and cities.How do I chain my models to this api? Any leads will be appreciated.Thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJt9CbjDgLT-_Gj9SuWnfStwgfTnOsSCXfwK%3DNNq3DRXGQmuzQ%40mail.gmail.com.

Heman Okumbo

unread,
May 6, 2022, 5:27:38 AM5/6/22
to django...@googlegroups.com
Thanks for the tip,i guess i have to dig deeper to get what exactly fits my model design.

Muhammad Juwaini Abdul Rahman

unread,
May 6, 2022, 5:36:57 AM5/6/22
to django...@googlegroups.com
Can you share the link of the API?

Heman Okumbo

unread,
May 6, 2022, 5:47:23 AM5/6/22
to django...@googlegroups.com
"ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
I need to chain my models  to this api such that after selecting the city,you a get a redirect to a form so you can fill in personal details

Heman Okumbo

unread,
May 6, 2022, 5:53:04 AM5/6/22
to django...@googlegroups.com

Heman Okumbo

unread,
May 6, 2022, 5:54:57 AM5/6/22
to django...@googlegroups.com
   <div class="card-body text-center">
                <select name="country" class="countries" id="countryId">
                    <option value="">Select Your  Country</option>
                </select>
                <select name="state" class="states" id="stateId">
                    <option value="">Select Your State/Provice</option>
                </select>
                <select name="city" class="cities" id="cityId">
                    <option value="">Select Your  City</option>
                </select>
            </div>
           
    <input type="submit" value="Submit">

<script src="//geodata.solutions/includes/countrystatecity.js"></script></html>
Reply all
Reply to author
Forward
0 new messages