Created
March 15, 2013 14:59
-
-
Save eka/5170447 to your computer and use it in GitHub Desktop.
refactor models.py into a module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# registration/models <- en vez de models.py | |
# dentro models/__init__.py | |
# /user.py | |
# /foo.py | |
# user.py | |
class User(models.Model): | |
pass | |
# foo.py | |
class Foo(models.Model): | |
pass | |
# __init__.py | |
from .user import User | |
from .foo import Foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment