Commits

Andrew Godwin committed 0225ace

Fix #363 (non-brilliant detection of python migration files)

Comments (0)

Files changed (1)

south/migration/base.py

     
     if getattr(settings, "SOUTH_USE_PYC", False):
         MIGRATION_FILENAME = re.compile(r'(?!__init__)' # Don't match __init__.py
-                                        r'[^.]*'        # Don't match dotfiles, or names with dots in them
-                                        r'(\.pyc?)$')     # Match .py or .pyc files, or module dirs
+                                        r'[0-9a-zA-Z_]*' # Don't match dotfiles, or names with dots/invalid chars in them
+                                        r'(\.pyc?)?$')     # Match .py or .pyc files, or module dirs
     else:
         MIGRATION_FILENAME = re.compile(r'(?!__init__)' # Don't match __init__.py
-                                        r'[^.]*'        # Don't match dotfiles, or names with dots in them
+                                        r'[0-9a-zA-Z_]*' # Don't match dotfiles, or names with dots/invalid chars in them
                                         r'(\.py)?$')       # Match only .py files, or module dirs
 
     def __init__(self, application, force_creation=False, verbose_creation=True):