Couldn't the User just have a ForeignKey on countries? On Thursday, April 16, 2020 at 12:52:07 PM UTC+8, shreehari Vaasistha L wrote: > > 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/b1d051a8-ee61-4b0a-b5e4-66d0315306fa%40googlegroups.com.