Amélioration soumission d'événement
- message succès plutôt que information - ajout d'un clean_url par défaut
This commit is contained in:
parent
ceaf13085a
commit
bd97bc0976
@ -190,6 +190,9 @@ class Extractor(ABC):
|
|||||||
def is_known_url(url):
|
def is_known_url(url):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def clean_url(url):
|
||||||
|
return url
|
||||||
|
|
||||||
def set_header(self, url):
|
def set_header(self, url):
|
||||||
self.header["url"] = url
|
self.header["url"] = url
|
||||||
self.header["date"] = datetime.now()
|
self.header["date"] = datetime.now()
|
||||||
@ -372,6 +375,3 @@ class EventNotFoundExtractor(Extractor):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return self.get_structure()
|
return self.get_structure()
|
||||||
|
|
||||||
def clean_url(url):
|
|
||||||
return url
|
|
||||||
|
@ -340,7 +340,7 @@ def import_event_proxy(request):
|
|||||||
)
|
)
|
||||||
return HttpResponseRedirect(ex.get_absolute_url())
|
return HttpResponseRedirect(ex.get_absolute_url())
|
||||||
else:
|
else:
|
||||||
messages.info(
|
messages.success(
|
||||||
request,
|
request,
|
||||||
_(
|
_(
|
||||||
"This type of address is known to the calendar, so an automatic import is proposed."
|
"This type of address is known to the calendar, so an automatic import is proposed."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user