Answer the question
In order to leave comments, you need to log in
How to load data from a garter in django-admin?
There are countries . Every country has its cities. It is necessary to make it so that when a user selects a country in the admin panel, his cities are automatically loaded into another select (html tag).
In general, this option is not good for me:
models.py
class Slider(models.Model):
country = models.ForeignKey(Country, verbose_name="Страна")
city = models.ForeignKey(City, verbose_name="Город")
description = models.TextField(verbose_name="Описание тура")
status = models.BooleanField(verbose_name="Статус")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question