mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
ikiwiki: Don't redefine built-in type.
This commit is contained in:
parent
40a5d3206e
commit
6a8fa93477
@ -32,7 +32,7 @@ class IkiwikiForm(forms.Form):
|
|||||||
|
|
||||||
class IkiwikiCreateForm(forms.Form):
|
class IkiwikiCreateForm(forms.Form):
|
||||||
"""Form to create a wiki or blog."""
|
"""Form to create a wiki or blog."""
|
||||||
type = forms.ChoiceField(
|
site_type = forms.ChoiceField(
|
||||||
label=_('Type'),
|
label=_('Type'),
|
||||||
choices=[('wiki', 'Wiki'), ('blog', 'Blog')])
|
choices=[('wiki', 'Wiki'), ('blog', 'Blog')])
|
||||||
|
|
||||||
|
|||||||
@ -116,11 +116,11 @@ def create(request):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = IkiwikiCreateForm(request.POST, prefix='ikiwiki')
|
form = IkiwikiCreateForm(request.POST, prefix='ikiwiki')
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
if form.cleaned_data['type'] == 'wiki':
|
if form.cleaned_data['site_type'] == 'wiki':
|
||||||
_create_wiki(request, form.cleaned_data['name'],
|
_create_wiki(request, form.cleaned_data['name'],
|
||||||
form.cleaned_data['admin_name'],
|
form.cleaned_data['admin_name'],
|
||||||
form.cleaned_data['admin_password'])
|
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'],
|
_create_blog(request, form.cleaned_data['name'],
|
||||||
form.cleaned_data['admin_name'],
|
form.cleaned_data['admin_name'],
|
||||||
form.cleaned_data['admin_password'])
|
form.cleaned_data['admin_password'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user