Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rocky Meza
committed
Mar 2, 2015
1 parent
a840355
commit 0749ff1
Showing
7 changed files
with
131 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
Empty file.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
from django.conf.urls import patterns, include, url | ||
from django.conf.urls import url | ||
|
||
# TODO: this was removed in Django 1.8 we should get it from django-formtools | ||
from django.contrib.formtools.wizard.views import SessionWizardView | ||
|
||
urlpatterns = patterns('', | ||
) | ||
from .forms import Step1Form, Step2Form | ||
|
||
|
||
class TestWizardView(SessionWizardView): | ||
def get_context_data(self, **kwargs): | ||
kwargs = super(TestWizardView, self).get_context_data(**kwargs) | ||
# Django < 1.5 does not set the view object in the context | ||
kwargs['view'] = self | ||
return kwargs | ||
|
||
def done(self, form_list, **kwargs): | ||
context = { | ||
'form_list': form_list, | ||
} | ||
return self.render_to_response(context) | ||
|
||
|
||
urlpatterns = [ | ||
url(r'^test-wizard-view/$', TestWizardView.as_view([Step1Form, Step2Form]), name='test_wizard'), | ||
] |