﻿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
22172	Allow skipping outer parenthesis when defining index_together	EmilStenstrom	ANUBHAV JOSHI	"{{{
""For convenience, unique_together can be a single tuple when dealing with a single set of fields""
}}}

https://docs.djangoproject.com/en/dev/ref/models/options/#unique-together

This convenience feature is missing from [https://docs.djangoproject.com/en/dev/ref/models/options/#index-together index_together]. This code...

{{{
class Subscription(models.Model):
    ...
    class Meta:
        unique_together = (""dialog_content_type"", ""dialog_object_id"")
        index_together = (""dialog_content_type"", ""dialog_object_id"")
}}}

... crashes with this error message:

{{{
notifications.subscription: ""index_together"" refers to d, a field that doesn't exist.
notifications.subscription: ""index_together"" refers to i, a field that doesn't exist.
notifications.subscription: ""index_together"" refers to a, a field that doesn't exist.
notifications.subscription: ""index_together"" refers to l, a field that doesn't exist.
notifications.subscription: ""index_together"" refers to o, a field that doesn't exist.
notifications.subscription: ""index_together"" refers to g, a field that doesn't exist.
}}}

I think it would be nice if the two similar settings worked the same."	New feature	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	0	0	0	0	1	0
