Skip to content

Instantly share code, notes, and snippets.

@camilosanchez
Created November 28, 2014 16:47
Show Gist options
  • Save camilosanchez/ccccd27a9d03029d8506 to your computer and use it in GitHub Desktop.
Save camilosanchez/ccccd27a9d03029d8506 to your computer and use it in GitHub Desktop.
if self.steps.current == 'step4':
form_asistente = FormStep4
actividades = EventActivity.objects.all()
form_items = [ item.activityassist.all() for item in actividades ]
context['activity_form_items'] = zip(actividades, form_items)
# Sir Francis Drake Excercises
# if self.steps.current == 4:
# evento = EventActivity.objects.get(id = request.POST['evento'])
# context['objetos'] = evento
# return context
if self.steps.current == 'step4':
ActividadFormset = formset_factory(FormStep4, extra=1)
asistente_form = EventosFormset
actividades = EventActivity.objects.all()
# context.update({'actividades': actividades, 'asistente_form': asistente_form,})
items=[]
for actividad in actividades:
item = ({
'actividad': actividad,
'formulario': asistente_form
})
items.append(item)
context['items']=items
{%comment%}
{{ wizard.form.management_form }}
{{ asistente_form.form }}
{%endcomment%}
<h6>{{ item.actividad.place_name }}</h6>
<p>{{ item.actividad.description }}</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment