Explorar o código

Filenames are now based on classnames so that the PHP ActiveRecord autoloader will find them.

Taddeus Kroes %!s(int64=13) %!d(string=hai) anos
pai
achega
4cef104557
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      generate.py

+ 1 - 1
generate.py

@@ -193,7 +193,7 @@ class Model(object):
         return php_block(php) if add_php_block else php
 
     def filename(self):
-        return self.singular_name() + '.php'
+        return self.classname().lower().replace('_', '') + '.php'
 
     def create_path_from_dir(self, dirname):
         return os.path.dirname(dirname + '//') + '/' + self.filename()