Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HallDetail(DetailView):
- model = Hall
- form_class = OrderForm
- slug_field = 'hall_slug'
- slug_url_kwarg = 'hall_slug'
- template_name = 'hall.html'
- def get_context_data(self, **kwargs):
- context = super(HallDetail, self).get_context_data(**kwargs)
- context['tables'] = Table.objects.filter(hall=self.object.pk)
- context['form'] = OrderForm(initial={'table': self.object.pk, 'hall': self.object.pk})
- return context
Add Comment
Please, Sign In to add comment