Last active
August 29, 2015 14:10
-
-
Save camilosanchez/66ba737458c9747a9996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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