Skip to content

Instantly share code, notes, and snippets.

@myoffe
Created March 11, 2011 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myoffe/866433 to your computer and use it in GitHub Desktop.
Save myoffe/866433 to your computer and use it in GitHub Desktop.
Split Django models.py
# 1. Create a models folder under myApp.
# 2. Delete models.py and add a model_name.py file in the models folder for each model model_name.
# 3. Add the following to each model file :
class Meta:
app_label = 'myApp'
# 4. Add a line in models/_init__.py_ for each model file :
from myModelFile import myModel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment