divio/django-cms — pull request #1114 by kezabelle (2011-12-12 20:15:01+00:00)
Title: Move the unique constraint ValidationError for reverse_id.

Previously stored in ```__all__``` in ```form.errors``` it was displayed at the top of the admin change form. This isn't immediately useful, because it's an advanced setting people may not use often; additionally, the field is just labeled 'Id' in the change form, so the concept of the 'reverse URL id' is somewhat murky. I've had a couple of people assume it means the slug.

Now it highlights the form row & field itself, as with every other field on the change form.

This should be backwards compatible, as the [JavaScript responsible for collapsing fieldsets](https://code.djangoproject.com/browser/django/tags/releases/1.2/django/contrib/admin/media/js/collapse.js) skips over anything with errors (note: that link goes to 1.2 to demonstrate it has been this way for _ages_) and I've added a test case to ```AdminFormsTests``` that tests the ```PageForm``` output, as well as the admin change form response.