Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2059 closed enhancement (duplicate)

attempting to edit_inline an object with a unique field yields TypeError

Reported by: gJigsaw@… Owned by: adrian
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: UI/UX:

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

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by anonymous

  • Component changed from Admin interface to django-admin.py
  • milestone set to Version 0.93
  • priority changed from normal to low
  • Severity changed from normal to trivial
  • Type changed from defect to enhancement
  • Version changed from SVN to new-admin

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

  • milestone changed from Version 0.93 to Version 1.0

0.93 has come and gone.

comment:3 Changed 8 years ago by russell@…

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #565

comment:4 Changed 7 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.