Code

Opened 9 years ago

Closed 6 years ago

Last modified 3 years ago

#957 closed defect (fixed)

A SlugField with prepopulate_from does not work for stacked or tabular edit_inline objects.

Reported by: matt Owned by: xian
Component: contrib.admin Version: newforms-admin
Severity: normal Keywords: nfa-someday
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I noticed this over the weekend and haven't had a chance to look at it much further. Here's an example:

class InlineObject(meta.Model):
    name = meta.CharField(maxlength=200, core=True)
    slug = meta.SlugField(prepopulate_from=(("name"),), core=True)
    otherobj = meta.ForeignKey(Otherobj, edit_inline=meta.STACKED, num_in_admin=2)

In the admin for Otherobj the javascript slugification does not work for the InlineObjects.

Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ubernostrum

  • Owner changed from nobody to xian
  • Version set to newforms-admin

Reassigning to xian since he's working on JS for newforms-admin and should ensure that this is fixed :)

comment:3 Changed 7 years ago by brosner

  • Keywords nfa-someday added

Tagging with nfa-someday as this is functionality that is not critical to the merge of the newforms-admin branch. However, I see this as something pretty simple to include before merging and would be nice to fix.

comment:4 Changed 6 years ago by programmerq

  • milestone set to 1.0

comment:5 Changed 6 years ago by brosner

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

(In [8385]) Fixed #957 -- prepopulated_fields now works correctly on inlines.

comment:6 Changed 3 years ago by jacob

  • milestone 1.0 deleted

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