On Wed, Dec 30, 2009 at 6:24 PM, gintare <g.statk...@gmail.com> wrote:

>   Hello,
>
>  In short
>  OS Debian Gnu Linux Lenny
>  Python 2.5
>  Installed Django-1.1.1.tar.gz,
> /usr/lib/python-django/Django-1.1.1/docs/intro/tutorial01.txt
>
> command         python manage.py sql polls
> gives error:       IndentationError: unexpected indent
> in   File "/mano/mysite3/../mysite3/polls/models.py",
>      line 5
>     class Poll (models.Model):
>
> What is wrong with syntax in this line "class Poll (models.Model):" ?
>
>
Looks like you have a space or two in front of the word "class". Spaces are
meaningful in Python.

-Doug



>
> -------------------------------------------------------------------------------------------
> trying according example:
> /usr/lib/python-django/Django-1.1.1/docs/intro/tutorial01.txt
>
> the sequence of the commands, which went fluently was:
>
> `django-admin.py startproject mysite3'
> (i have to make adjustments to settings.py choosing Sqlite3 and
> creating database)
>
> python manage.py runserver
> python manage.py syncdb
> python manage.py startapp polls
>
> creates folder polls with file models.py into which i have to paste
> code from tutorial01.txt
> .....
>    class Poll(models.Model):
>        question = models.CharField(max_length=200)
> .....
>
> the next command python manage.py sql polls
> gives error: IndentationError: unexpected indent
> in   File "/mano/mysite3/../mysite3/polls/models.py",
>      line 5
>     class Poll (models.Model):
>
>
> ------------------------------------------------------------------------------------------------------
> The whole error report:
>
> working:/mano/mysite3# python manage.py sql polls
> Traceback (most recent call last):
>  File "manage.py", line 11, in <module>
>    execute_manager(settings)
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> __init__.py", line 362, in execute_manager
>    utility.execute()
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> __init__.py", line 303, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> base.py", line 195, in run_from_argv
>    self.execute(*args, **options.__dict__)
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> base.py", line 221, in execute
>    self.validate()
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> base.py", line 249, in validate
>    num_errors = get_validation_errors(s, app)
>  File "/usr/lib/python2.5/site-packages/django/core/management/
> validation.py", line 28, in get_validation_errors
>    for (app_name, error) in get_app_errors().items():
>  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py",
> line 131, in get_app_errors
>    self._populate()
>  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py",
> line 58, in _populate
>    self.load_app(app_name, True)
>  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py",
> line 74, in load_app
>    models = import_module('.models', app_name)
>  File "/usr/lib/python2.5/site-packages/django/utils/importlib.py",
> line 35, in import_module
>    __import__(name)
>  File "/mano/mysite3/../mysite3/polls/models.py", line 5
>    class Poll(models.Model):
>    ^
> IndentationError: unexpected indent
>
> regards,
> gintare
> g.statk...@gmail.com
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to