python - attributeError: "module" object has no attribute "DateTimeField" -


so doing tutorial online "https://www.youtube.com/watch?v=kqn4u28t-jq" , error. tried best find out did wrong , stumped.

my admin.py file

from django.contrib import admin  # register models here. blog.models import post  admin.site.register(post) 

my models.py file

models.py django.db import models  # create models here. class post(models.model):     title = models.charfield(max_length = 140)     body = models.textfield()     date = models.datetimefeild()      def __unicode__(self):         return self.title 

what returned when put manage.py syncdb console.

c:\users\user\desktop\mysite\mysite>manage.py syncdb     traceback (most recent call last):       file "c:\users\user\desktop\mysite\mysite\manage.py", line 10, in <module>         execute_from_command_line(sys.argv)       file "c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\core\managem     ent\__init__.py", line 338, in execute_from_command_line         utility.execute()       file "c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\core\managem     ent\__init__.py", line 312, in execute         django.setup()       file "c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\__init__.py"     , line 18, in setup         apps.populate(settings.installed_apps)       file "c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\apps\registr     y.py", line 108, in populate         app_config.import_models(all_models)       file "c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\apps\config.     py", line 198, in import_models         self.models_module = import_module(models_module_name)       file "c:\python27\lib\importlib\__init__.py", line 37, in import_module         __import__(name)       file "c:\users\user\desktop\mysite\mysite\blog\models.py", line 4, in <modul     e>         class post(models.model):       file "c:\users\user\desktop\mysite\mysite\blog\models.py", line 7, in post         date = models.datetimefeild()     attributeerror: 'module' object has no attribute 'datetimefeild' 

looks have typo: s/feild/field/g


Comments