Commits

J.A. Roberts Tunney committed 5cc5815

Fix some bugs in django fixture loading

Comments (0)

Files changed (2)

django/core/management/commands/loaddata.py

                                 fixture.close()
                                 transaction.rollback()
                                 transaction.leave_transaction_management()
+                                raise # jart 2010-02-17: Stop being annoying!
                                 if show_traceback:
                                     import traceback
                                     traceback.print_exc()
                                 transaction.rollback()
                                 transaction.leave_transaction_management()
                                 return
-                    except:
+                    except IOError: # jart 2010-02-17: Stop being annoying!
                         if verbosity > 1:
                             print "No %s fixture '%s' in %s." % \
                                 (format, fixture_name, humanize(fixture_dir))

django/db/models/fields/__init__.py

         if isinstance(value, datetime.date):
             return value
 
+        if value.endswith(' 00:00:00'):
+            value = value[:-len(' 00:00:00')]
         if not ansi_date_re.search(value):
             raise exceptions.ValidationError(
                 _('Enter a valid date in YYYY-MM-DD format.'))