Add private properties and consist thumbnail

This commit is contained in:
2022-07-12 19:00:29 +02:00
parent 47b4b2915b
commit 2dbe01d8bd
9 changed files with 51 additions and 4 deletions

View File

@@ -113,11 +113,18 @@ class GetRollingStock(View):
except ObjectDoesNotExist:
raise Http404
properties = (
rolling_stock.property.all() if
request.user.is_authenticated else
rolling_stock.property.filter(property__private=False)
)
return render(
request,
"page.html",
{
"rolling_stock": rolling_stock,
"properties": properties,
},
)