ikiwiki: Don't redefine built-in type.

This commit is contained in:
James Valleroy 2015-05-19 19:41:38 -04:00 committed by Sunil Mohan Adapa
parent 40a5d3206e
commit 6a8fa93477
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class IkiwikiForm(forms.Form):
class IkiwikiCreateForm(forms.Form):
"""Form to create a wiki or blog."""
type = forms.ChoiceField(
site_type = forms.ChoiceField(
label=_('Type'),
choices=[('wiki', 'Wiki'), ('blog', 'Blog')])

View File

@ -116,11 +116,11 @@ def create(request):
if request.method == 'POST':
form = IkiwikiCreateForm(request.POST, prefix='ikiwiki')
if form.is_valid():
if form.cleaned_data['type'] == 'wiki':
if form.cleaned_data['site_type'] == 'wiki':
_create_wiki(request, form.cleaned_data['name'],
form.cleaned_data['admin_name'],
form.cleaned_data['admin_password'])
elif form.cleaned_data['type'] == 'blog':
elif form.cleaned_data['site_type'] == 'blog':
_create_blog(request, form.cleaned_data['name'],
form.cleaned_data['admin_name'],
form.cleaned_data['admin_password'])