#8338 closed (worksforme)
Admin panel generating HTML table without <input> fields if variable contains "_A" string
Reported by: | Wojciech Bartosiak | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | no input fields html admin panel | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Main information
Admin panel generating HTML table to enter data.
But if object contains '_' char and after that is letter 'A'
( for example: 'Foo_Address' )
adv_forms don't creates fields ( INPUT field in HTML)
Django version
Django ver: SVN-checkout: rev.8365
# -*- coding: utf-8 -*- from django.db import models from django.contrib import admin from django.utils.translation import ugettext as _ class Foo(models.Model): foo = models.CharField(verbose_name=_('FOO'), max_length=11) class Foo_Address(models.Model): foo = models.ForeignKey(Foo) bar = models.CharField(max_length=11) class Foo_Faddress(models.Model): foo = models.ForeignKey(Foo) bar = models.CharField(max_length=11) class Foo_Address_Inline(admin.TabularInline): model = Foo_Address extra = 1 class Foo_Faddress_Inline(admin.TabularInline): model = Foo_Faddress extra = 1 class Foo_Admin(admin.ModelAdmin): inlines = [Foo_Address_Inline, Foo_Faddress_Inline] admin.site.register(Foo, Foo_Admin)
Attachments (3)
Change History (7)
by , 16 years ago
Attachment: | zrzutekranu.png added |
---|
comment:1 by , 16 years ago
milestone: | 1.0 beta → 1.0 |
---|
comment:2 by , 16 years ago
Summary: | Admin panel generating HTML table without <input> fields → Admin panel generating HTML table without <input> fields if variable contains "_A" string |
---|
comment:3 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I can't reproduce this using r8427. Tested with both en-us
and es-ar
Django localizations (see attached screenshots) and using the same exact models.py
file you posted (no admin.py
was used).
Unrelated note: You might want to replace ugettext
with ugettext_lazy
as per http://www.djangoproject.com/documentation/i18n/#lazy-translation
by , 16 years ago
Attachment: | ss01-t8338.png added |
---|
by , 16 years ago
Attachment: | ss02-t8338.png added |
---|
Scrrenshot in admin panel