Ummm.


-----Original Message-----
From: Chris Phillips <[EMAIL PROTECTED]>
Sent: Sunday, January 6, 2008 6:50pm
To: Django users <django-users@googlegroups.com>
Subject: "unexpected indent" error not allowing me to add the poll app to the 
admin site


Hi all,

I am following the online tutorial and I am unable to add my app to
the admin section.

When I runserver I get:
mysite.polls: unexpected indent (models.py, line 5)
1 error found

Here is my models.py:

from django.db import models
class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')
        class Admin: pass
---------------------------------------------------------
    ^^^^
    There it is!! You do understand how whitespace works in Python?
---------------------------------------------------------

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(maxlength=200)
    votes = models.IntegerField()
        class Admin: pass
----------------------------------------------------------
    ^^^^ 
    And again. 

----------------------------------------------------------
Am I doing something wrong?

>
> I think you probably should look at the python tutorial:
> http://docs.python.org/tut/tut.html
> in particular section 3.2 First Steps Toward Programming
> 
Owen



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to