﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29631	Feature Request: models.UniqueBooleanField()	Michael	nobody	"Imagine the schema for a tweet on Twitter:

{{{
class Tweet(models.Model):
   content = models.Charfield(max_length=280)
   user = models.ForeignKey(User)
   pinned = models.UniqueBooleanField(default=False, unique_with='user')
}}}

The user pins a tweet and behind the scenes `UniqueBooleanField` would set the previous tweet's pinned field to False (if any) and set the current one to True. This has tons of other use cases, including: the default group for a user and anything where there can only be one ""default"" given a `unique_with` property.

Is this a dumb idea? Is there already a better, more Django-idiomatic way? All feedback is appreciated. 

Thanks,

Michael"	New feature	closed	Database layer (models, ORM)	2.1	Normal	wontfix			Unreviewed	0	0	0	0	0	0
