Opened 17 years ago

Closed 17 years ago

#3596 closed (fixed)

Labels not positioned correctly in Admin

Reported by: anonymous Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: treborhudson@…, brooks.travis@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


After changeset 4590 (patch from ticket #2205), labels don't seem to show up correctly in the admin app. Specifically, it seems that all the text-field labels in a row after the first are floated to the left underneath the row.

Change History (7)

comment:1 Changed 17 years ago by matt <matt.barry@…>

Whoops.. tried to upload some screenshots, but Trac doesn't seem to care for them:

TypeError: PgQuoteString() argument 1 must be string without null bytes, not str

comment:2 Changed 17 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedAccepted

comment:3 Changed 17 years ago by Rob Hudson <treborhudson@…>

Cc: treborhudson@… added

Can you describe your Admin options that shows the UI problem?

comment:4 Changed 17 years ago by matt <matt.barry@…>

It is trivially reproducible: this reproduces the problem for me.

from django.db import models

class testmodel(models.Model):
    first = models.CharField(maxlength=10)
    second = models.CharField(maxlength=10)
    third = models.CharField(maxlength=10)
    class Admin:
        fields = (
            (None, {
                'fields' : (

On the change form for testmodel, the labels for second and third are floated below and to the left. Which is what I expect, based on the CSS (the label for first does not receive the "inline" class). It seems to me that the patch from revision 4590 (#2205) should be reverted; the "inline" class should probably not be applied to edit_inline STACKED labels at all.

comment:5 Changed 17 years ago by brooks.travis@…

Cc: brooks.travis@… added

I'm experiencing this problem as well. Here's a link to a screenshot:

Here's the relevant code in my model:

fields = (
			(None, {
				'fields': (('first_name', 'middle_name', 'last_name'), ('gender', 'ssn', 'birth_date'), 'birth_place', ('home_address', 'home_city', 'home_state', 'home_zip', 'home_county'), ('phone', 'email'), ('secondary_contact', 'secondary_contact_relationship'),)

comment:6 Changed 17 years ago by Rob Hudson <treborhudson@…>

Yeah, that's definitely worse than the view you get with bug 2205. I agree Changeset 4590 should be reverted and bug 2205 should be re-opened.

comment:7 Changed 17 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [4652]) Reverted [4590] (changes to field label CSS) since it caused more problems than it created. Fixes #3596 and reopens #2205.

Note: See TracTickets for help on using tickets.
Back to Top