Досадная ошибка, господа( Не знаю что и делать. В сеттинг всё настроено как надо, проект добавлен, но не могу создать модель! Вот:
models.py:
from django.db import models
# Create your models here.
Class Index ( models.Model ):
index_title = models.CharField ( max_length = 100 )
index_body = models.TextFiled ()
def __unicode__ ( self ):
return self.index_title, self.index_body
Делаю ./manage.py syncdb:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/shell.py", line 46, in handle_noargs
get_models()
File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 181, in get_models
self._populate()
File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
self.load_app(app_name, True)
File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/h3x/test/newsite/core/models.py", line 5
Class Index ( models.Model ):
^
SyntaxError: invalid syntax
Но синтаксис правильный, в чём может быть проблема?
Заранее спасибо.