Django

Code

Ticket #7219 (closed: invalid)

Opened 2 months ago

Last modified 2 months ago

edit_inline=models.TABULAR

Reported by: ogiaquino@gmail.com Assigned to: nobody
Milestone: Component: Documentation
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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:

pass

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

Thanks and regards, Paulo :-)

Attachments

Change History

05/12/08 16:48:11 changed by ElliottM

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to invalid.
  • needs_tests changed.
  • needs_docs changed.

The ticket system is designed for bugs and enhancements to django, not for questions and support. The best place to ask is http://groups.google.com/group/django-users


Add/Change #7219 (edit_inline=models.TABULAR)




Change Properties
Action