On Sun, 2006-06-25 at 00:18 +0000, Scott McCracken wrote:
> Don,
> 
> Thank you for that tip - it does have something to do with the
> indenting. I am a bit confused as to why that is happening as I was
> simply trying to follow the example which shows code like:
> 
> class Poll(models.Model):
>     # ...
>     class Admin:
>         pass
> 
> I am using TextMate on OS X and making sure that my file type is set to
> 'python'. I am using tab to indent code, is there a good reference to
> indenting python code on the web? Thanks!

PEP 8 is the more-or-less canonical reference, since it is what is used
in the standard Python libraries (see [1]). Django tends to follow the
guidelines in there, in particular, indenting is done with four spaces
(not tabs). So that is almost certainly your problem in this case.

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

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to