forked from DGNum/gestioCOF
core -- Apply black + isort to all files
This commit is contained in:
parent
104e71dcf6
commit
fdd2b35289
196 changed files with 10727 additions and 8365 deletions
|
@ -3,18 +3,14 @@ from kfet.models import Article
|
|||
|
||||
def get_articles(request=None):
|
||||
articles = (
|
||||
Article.objects
|
||||
.filter(is_sold=True, hidden=False)
|
||||
.select_related('category')
|
||||
.order_by('category__name', 'name')
|
||||
Article.objects.filter(is_sold=True, hidden=False)
|
||||
.select_related("category")
|
||||
.order_by("category__name", "name")
|
||||
)
|
||||
pressions, others = [], []
|
||||
for article in articles:
|
||||
if article.category.name == 'Pression':
|
||||
if article.category.name == "Pression":
|
||||
pressions.append(article)
|
||||
else:
|
||||
others.append(article)
|
||||
return {
|
||||
'pressions': pressions,
|
||||
'articles': others,
|
||||
}
|
||||
return {"pressions": pressions, "articles": others}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue