diff --git a/event/templates/event/event_info.html b/event/templates/event/event_info.html index 21018ab..ae31f74 100644 --- a/event/templates/event/event_info.html +++ b/event/templates/event/event_info.html @@ -10,6 +10,7 @@

{{event.name}} Event

  • Starts At: {{event.start_time}}
  • Ends At: {{event.end_time}}
  • Participants : {{event.participants_num}}/{{event.max_participants}}
  • +
  • Poll : {{event.poll}}
  • {% endblock %} diff --git a/poll/views.py b/poll/views.py index fd0e044..5715c4c 100644 --- a/poll/views.py +++ b/poll/views.py @@ -1,3 +1,9 @@ # from django.shortcuts import render +from django.shortcuts import render +from .models import Poll -# Create your views here. + +def view_poll(request): + poll_id = request.GET["id"] + poll = Poll.manager.get(id=poll_id) + return render(request, 'event/event_info.html', {'poll': poll})