[extensions-web] extensions: Remove a specialized error message handler



commit 99cac9152677cff8cb19be1d81a9b24f8bc0a329
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Apr 24 04:17:46 2012 -0400

    extensions: Remove a specialized error message handler
    
    If we want to handle this in the future, we should use modelforms
    or something.

 sweettooth/extensions/views.py |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index ca29bc6..6c11796 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -424,13 +424,7 @@ def upload_file(request):
             try:
                 extension.full_clean()
             except ValidationError, e:
-                # Output a specialized error message for a common mistake:
-                if getattr(e, 'message_dict', None) and 'url' in e.message_dict:
-                    errors = [mark_safe("You have an invalid URL. Make sure your URL "
-                                        "starts with <pre>http://</pre>")]
-                else:
-                    errors = e.messages
-
+                errors = e.messages
                 transaction.rollback()
             else:
                 version = models.ExtensionVersion.objects.create(extension=extension,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]