Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Add a link to submit a site and fix a bug in domain submission

Daoud Clarke69b4abea53ee
diff --git a/mwmbl/templates/home.html b/mwmbl/templates/home.html
index 00337f5..bd78278 100644
--- a/mwmbl/templates/home.html
+++ b/mwmbl/templates/home.html
@@ -1,6 +1,7 @@
{% load humanize %}
{% include "title.html" %}
-<p>Welcome to Mwmbl! Please read the <a href="https://book.mwmbl.org/page/curating/">guidelines</a> before editing results.</p>
+<p>Welcome to Mwmbl! Feel free to <a href="{% url "submit_domain" %}">submit</a> a site to crawl.
+ Please read the <a href="https://book.mwmbl.org/page/curating/">guidelines</a> before editing results.</p>
<br>
<div is="mwmbl-add-result" style="display: none">
<form class="modal-content"
diff --git a/mwmbl/views.py b/mwmbl/views.py
index 87d7508..181c197 100644
--- a/mwmbl/views.py
+++ b/mwmbl/views.py
@@ -165,9 +165,11 @@ class DomainSubmissionForm(ModelForm):
original_name = self.cleaned_data["name"]
try:
domain = parse_url(original_name).netloc
- return domain
+ if domain is not None:
+ return domain
except ValueError:
- return original_name
+ pass
+ return original_name
class DomainSubmissionApprovalForm(ModelForm):