renommage d'une classe (plus explicite)
This commit is contained in:
parent
c0c459a213
commit
15a562f390
@ -37,7 +37,7 @@ import logging
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class EventSubmissionForm(Form):
|
class URLSubmissionForm(Form):
|
||||||
url = URLField(max_length=512)
|
url = URLField(max_length=512)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ from django.urls import reverse
|
|||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
|
||||||
from .forms import (
|
from .forms import (
|
||||||
EventSubmissionForm,
|
URLSubmissionForm,
|
||||||
EventForm,
|
EventForm,
|
||||||
BatchImportationForm,
|
BatchImportationForm,
|
||||||
FixDuplicates,
|
FixDuplicates,
|
||||||
@ -533,7 +533,7 @@ def import_from_url(request):
|
|||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
form = EventSubmissionForm()
|
form = URLSubmissionForm()
|
||||||
|
|
||||||
initial = {
|
initial = {
|
||||||
"start_day": date.today() + timedelta(days=1),
|
"start_day": date.today() + timedelta(days=1),
|
||||||
@ -544,7 +544,7 @@ def import_from_url(request):
|
|||||||
form_event = EventForm(initial=initial)
|
form_event = EventForm(initial=initial)
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
form = EventSubmissionForm(request.POST)
|
form = URLSubmissionForm(request.POST)
|
||||||
|
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
cd = form.cleaned_data
|
cd = form.cleaned_data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user