Opened 19 years ago

Closed 18 years ago

Last modified 18 years ago

#2059 closed enhancement (duplicate)

attempting to edit_inline an object with a unique field yields TypeError

Reported by: gJigsaw@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version: new-admin
Severity: trivial Keywords: edit_inline unique TypeError
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

from django.db import models

class Address(models.Model):

street1 = models.CharField(maxlength=50)
def str(self):

return self.street1

class Admin:

search_fields = street1

class Dog(models.Model):

address = models.ForeignKey(Address,edit_inline=models.TABULAR)

# use the following line and it works fine
# name = models.CharField(maxlength=20,core=True)

# use the following line with SVN update revision code 3045 to get the following exception

name = models.CharField(maxlength=20,unique=True,core=True)

# Exception Value: Cannot resolve keyword 'name' into field
# Exception Location: /usr/lib/python2.4/site-packages/django/db/models/query.py in lookup_inner, line 800

def str(self):

return self.name

# May (or may not) relate to ticket # 565

Change History (4)

comment:1 by anonymous, 18 years ago

Component: Admin interfacedjango-admin.py
milestone: Version 0.93
priority: normallow
Severity: normaltrivial
Type: defectenhancement
Version: SVNnew-admin

comment:2 by Gary Wilson <gary.wilson@…>, 18 years ago

milestone: Version 0.93Version 1.0

0.93 has come and gone.

comment:3 by russell@…, 18 years ago

Resolution: duplicate
Status: newclosed

This is a duplicate of #565

comment:4 by (none), 18 years ago

milestone: Version 1.0

Milestone Version 1.0 deleted

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