Aug 11

Django Model Style Guide

Tag: Programming & InternetDustin @ 11:58 am

(This post is mostly for my own reference)

James Bennett mentions a Django style guide in his book Practical Django Projects. I couldn’t find reference to it, but the following is the order of things when it comes to models:

Any constants and/or lists of choices The full list of fields The Meta class if present The Admin class if present The __unicode__() method The save() method, if its being overridden The get_absolute_url() method, if present Any additional custom methods

Leave a Reply

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.



ss_blog_claim=4973c51f5e7bec57951f995fed1b85f3ss_blog_claim=4973c51f5e7bec57951f995fed1b85f3


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser