dtdave,

Basically, the model structure is how you indicated. To achieve changing
the content of a select once the page is loaded, you will have to do some
JavaScript magic. Django-select2 will do that for you, and there are other
django packages, or you can roll your own if it is not too complicated (ie
simple case - some JavaScript, a special url, and a special view for that
url to get the data - there are examples in github for this as well).
Django does not do this for you out of the box. IMO, it all depends on how
comfortable you are with JavaScript.

Mark

On Mon, Aug 13, 2018 at 9:57 AM, Mikhailo Keda <mriy...@gmail.com> wrote:

> Create a 4 models:
> 1. Region
> 2. County (has a foreign key to Region)
> 3. Office (has a foreign key to County)
> 4. Employee (has a foreign key to Office)
>
> organise url by this pattern:
> /<prefix>/<region_slug>/<county_slug>/<office_slug>/<employee_slug>
>
> check this example to handle a form - http://django-select2.
> readthedocs.io/en/latest/extra.html#chained-select2
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/80b180a9-2b58-4569-903e-3f1b387e3b7c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/80b180a9-2b58-4569-903e-3f1b387e3b7c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2Ov0ccAne_-HcT3_J4hSRX0k6NCaj8ufreHC1ENN7fFgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to