Answer the question
In order to leave comments, you need to log in
Python Django, how to filter news by tags?
How to write a controller that filters news by tags.
There are 2 related models News and tags with many to many relationship.
There is this url:
url(r'^(?P<slug>[\w-]+)/$', NewsDetailPage.as_view(), name='detail')
Answer the question
In order to leave comments, you need to log in
https://docs.djangoproject.com/en/1.11/topics/db/e...
In general, if postgres is used, it is better to store tags in JsonField
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question