Skip to content

Instantly share code, notes, and snippets.

@camilosanchez
Last active August 29, 2015 14:10
Show Gist options
  • Save camilosanchez/66ba737458c9747a9996 to your computer and use it in GitHub Desktop.
Save camilosanchez/66ba737458c9747a9996 to your computer and use it in GitHub Desktop.
class RegisterStepsWizard(SessionWizardView):
instance = None
# mi función para crear una instancia de ActivityAssist por cada instancia de Activity que exista
def activity_forms():
activity_object = Activity.objects.all()
new_activity = FormStep4()
items = []
for a in activity_object:
new_activity.append(items)
return items
def get_context_data(self, form, **kwargs):
context = super(RegisterStepsWizard, self).get_context_data(form=form, **kwargs)
# mi función para mi vista
assistant_object = activity_forms()
if self.steps.current == 'step4'
for activity, assistant in zip(activity_object, assistant_object):
context['activity_assistant'] = activity_object, assistant_object
return context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment