Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Slug defined with related model #251

Answered by ptifloflo
ptifloflo asked this question in Q&A
Discussion options

Hello,

Can we define SlugOptions generateSlugsFrom with related model or is this only possible with model attributes ?

Florian

You must be logged in to vote

Sorry, I found !

You can pass string, array or callable. So if you pass a callable, you can construct your slug with data in related model.

Replies: 1 comment

Comment options

Sorry, I found !

You can pass string, array or callable. So if you pass a callable, you can construct your slug with data in related model.

You must be logged in to vote
0 replies
Answer selected by ptifloflo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /