Skip to content

Instantly share code, notes, and snippets.

@eka
Created March 15, 2013 14:59
Show Gist options
  • Save eka/5170447 to your computer and use it in GitHub Desktop.
Save eka/5170447 to your computer and use it in GitHub Desktop.
refactor models.py into a module
# 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