mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add private properties and consist thumbnail
This commit is contained in:
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user