My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 1: Break models.py into separate files
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  SabreCap...@gmail.com


 
Project Member Reported by SabreCap...@gmail.com, Sep 29, 2012
Currently, all models are in a single file. This is obviously not good, and needs to change. Specific directory structure of the new files does not matter, but each model should have it's own file. Some models also have an associated input form, and that should be in the same file as the model.
Oct 1, 2012
Project Member #1 m...@umbc.edu
The typical Django convention is to have all of models for an app in the same models.py file and all of the forms for an app in the same forms.py file.

For example:https://github.com/django/django/blob/master/django/contrib/auth/models.py

That being said we should split the models up into separate apps.  For instance the fencer profile and ref profile portions should probably not be in the same app as the event/tournament.

Also the STATIC stuff such as GENDER_CHOICES should be pulled into a settings file.
Oct 1, 2012
Project Member #2 SabreCap...@gmail.com
You're right, I think that convention will flow a lot better with Django, new action item is to split each model into an app, and each model and form into it's own model.py and forms.py files. Static items will also be broken into a global settings file.

Powered by Google Project Hosting