X
X
xCrusaderx2014-08-11 19:27:29
Django
xCrusaderx, 2014-08-11 19:27:29

Explain why slugfield is needed in django?

Often in models I set a field called slug, I don’t quite understand why it is needed, tell me please

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Filatov, 2014-08-12
@xCrusaderx

For example, you have articles on the site. And you want links like /pages/novaya-statya/ , the article is called NEW ARTICLE, and the link is novaya-statya. That's what it's for. By the way, see also that ideally they (slugfields) should be unique.

X
xCrusaderx, 2014-08-12
@xCrusaderx

Thank you all understood =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question