django naming conventions ?

63 views
Skip to first unread message

PFL

unread,
Jun 25, 2008, 6:02:11 PM6/25/08
to Django users
After reviewing the code i have written for a non-trivial but still
modest Django app, I realized that my names for Django objects
followed no standard (case, plural, underscores, etc) - I discovered
this when I wasted at least 30 minutes trying to figure out an error
that was caused by a wrong case name for class in my model (ok, it was
late, I was tired).

I have done some searching but could not find a set of standard naming
conventions that is recommended for Django objects:

- project name
- application name
- class names in models.py
- template names
- names of keys in my results object of render_to_response
- form names in forms.py

does anyone know of one they might point out?

thanks,
Peter Liske

James Bennett

unread,
Jun 25, 2008, 6:22:06 PM6/25/08
to django...@googlegroups.com
On Wed, Jun 25, 2008 at 5:02 PM, PFL <pe...@liske.org> wrote:
> I have done some searching but could not find a set of standard naming
> conventions that is recommended for Django objects:

There's really not much that's Django-specific; as with most Python
code, the recommendation is to follow the Python style guide:

http://www.python.org/dev/peps/pep-0008/


--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Alex Slesarev

unread,
Jun 25, 2008, 7:52:51 PM6/25/08
to Django users
Reply all
Reply to author
Forward
0 new messages