how can i use model x values as choices for model y ? for eg: class countries(models.Model): country = models.CharField(max_length=200)
def __str__(self): return self.country class User(AbstractUser): """User model.""" username = None full_name = models.CharField(_("Full Name"), max_length=50, default="Full Name") country_choices = models.CharField(choices=countries -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/683251c6-27ab-4454-90d6-532fdcc749ce%40googlegroups.com.