Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11922 closed (invalid)

Label for ManyToManyField

Reported by: DigitalGod Owned by: nobody
Component: Forms Version: 1.1
Severity: Keywords: ManyToManyField, label
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

While using ManyToManyField with through option i can't render the form.

Error is

Caught an exception while rendering: 'NoneType' object has no attribute 'label'

Here is the code for member model

...
group = models.ManyToManyField(Group, blank=True, through='Membership')
...

if i don't use through option - the form is rendered successfully

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by russellm

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

There isn't anywhere near enough detail for this to be a valid bug report - for instance what is "the form"?

It's also possible that this is a "how do I" query - in which case, your first stop should be asking on django-users.

comment:2 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 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.