Changeset View
Changeset View
Standalone View
Standalone View
films/views/gallery.py
| Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | def collection_detail(request: HttpRequest, film_slug: str, collection_slug: str) -> HttpResponse: | ||||
| **Template:** | **Template:** | ||||
| :template:`films/collection_detail.html` | :template:`films/collection_detail.html` | ||||
| """ | """ | ||||
| film = get_object_or_404(Film, slug=film_slug, is_published=True) | film = get_object_or_404(Film, slug=film_slug, is_published=True) | ||||
| collection = get_object_or_404(Collection, slug=collection_slug, film_id=film.id) | collection = get_object_or_404(Collection, slug=collection_slug, film_id=film.id) | ||||
| child_collections = collection.child_collections.order_by('order', 'name') | child_collections = collection.child_collections.order_by('order', 'name') | ||||
| drawer_menu_context = get_gallery_drawer_context(film) | drawer_menu_context = get_gallery_drawer_context(film, request.user) | ||||
sybren: Does this change have anything to do with the other changes in this patch? | |||||
natkaAuthorUnsubmitted Done Inline ActionsThis is just to fix an error - this function needs two arguments. I have committed a fix to develop in the meantime (but this was after I created this revision). natka: This is just to fix an error - this function needs two arguments. I have committed a fix to… | |||||
sybrenUnsubmitted Not Done Inline ActionsYou can update patches, that way you can remove unrelated changes if you see they accidentally made it into the patch. sybren: You can update patches, that way you can remove unrelated changes if you see they accidentally… | |||||
| context = { | context = { | ||||
| 'film': film, | 'film': film, | ||||
| 'current_collection': collection, | 'current_collection': collection, | ||||
| 'current_assets': collection.assets.filter(is_published=True) | 'current_assets': collection.assets.filter(is_published=True) | ||||
| .order_by('order', 'name') | .order_by('order', 'name') | ||||
| .select_related('static_asset__storage_location'), | .select_related('static_asset__storage_location'), | ||||
| 'child_collections': child_collections, | 'child_collections': child_collections, | ||||
| Show All 14 Lines | |||||
Does this change have anything to do with the other changes in this patch?