Opened 6 years ago

Closed 6 years ago

#7219 closed (invalid)


Reported by: ogiaquino@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Hello authors can you please help me with this code:

class Choice(models.Model):

poll = models.ForeignKey(Poll, edit_inline=models.TABULAR, num_in_admin=3)
choice = models.CharField(max_length=200, core=True)
votes = models.IntegerField(core=True)

def unicode(self):

return self.choice

while im trying to add choice I get an error message saying:

TypeError at /admin/polls/poll/add/
'int' object is unsubscriptable

i think edit_inline=models.TABULAR is the culprit, if I remove this and use inline class like this:

class Admin:


everything is working fine. Please help me on correcting this, is this a Django bug?

Thanks and regards,
Paulo :-)

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by ElliottM

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

The ticket system is designed for bugs and enhancements to django, not for questions and support. The best place to ask is

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.