Skip to content
Snippets Groups Projects
Commit 7f955c29 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add submission into the context

parent 74a5ae1c
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,6 @@ urlpatterns = [
path('submissions/', SubmissionListView.as_view(), name="submissions"),
path('submissions/<int:pk>/', SubmissionDetailView.as_view(), name="submission"),
path('submissions/<int:pk>/edit', SubmissionEditView.as_view(), name="edit_submission"),
path('submissions/<int:pk>/review/', include('opentech.apply.review.urls')),
path('submissions/<int:submission_pk>/review/', include('opentech.apply.review.urls')),
path('search', SubmissionSearchView.as_view(), name="search"),
]
......@@ -4,6 +4,7 @@
<div class="wrapper wrapper--breakout wrapper--admin">
<div class="wrapper wrapper--medium">
<h2 class="heading heading--no-margin">Create Review</h2>
<h5>For: {{ submission.title }}</h5>
</div>
</div>
......
......@@ -8,3 +8,10 @@ from .models import Review
class CreateReviewView(CreateView):
model = Review
fields = ['review']
def get_context_data(self, **kwargs):
submission = get_object_or_404(ApplicationSubmission, id=self.kwargs['submission_pk'])
return super().get_context_data(
submission=submission,
**kwargs,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment