wafflesfm / batter

It makes Waffles.
Other
83 stars 18 forks source link

Label foreign key -> self #46

Closed jzelinskie closed 11 years ago

jzelinskie commented 11 years ago
09:19:41 (Forked_Tongue_Dev) hey, just wanted to ask why when you guys are reffering to the same model class for a foriegn key link, you don't just use self?
09:20:40 (Forked_Tongue_Dev) eg: https://github.com/wafflesfm/batter/blob/develop/batter/music/models.py #171-173
09:21:56 (Forked_Tongue_Dev) there you're using 'Label', but you could use self, which is instantly understandable and won't break if someone changes the name of the class and doesn't check the foreign key
09:23:14 (Forked_Tongue_Dev) https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey << django docs even reccomend it
coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 76ceb7c7d6f33a82324c797355e17988473fcdfa on jzelinskie:feature/recursive-label-model into 5a07a05c05b3bf922f69314f7001e19f061c9f12 on wafflesfm:develop.