> What is the best practice for making it so when I toggle is_featured
> to on for Balboa Park the admin enforces a rule that only one place
> can be featured for a city. Hope that makes sense, thank you.

You could override save on Place and unset the other places.  Although
I think it might be better to change your models slightly:

class City(models.Model):
     city = models.CharField(max_length=100, unique=True)
     featured_place=models.ForeignKey('Place')

class Place(models.Model):
    city = models.ForeignKey(City)
    title = models.CharField(max_length=255)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to