Hi, as Lachian said, It is spelling mistake for ForeignKey. Just correct your word.
On Fri, Oct 26, 2012 at 8:56 AM, Lachlan Musicman <data...@gmail.com> wrote: > On Fri, Oct 26, 2012 at 10:39 AM, Rodrigo Morgado > <rodrigo%ewok...@gtempaccount.com> wrote: > > Hi everybody, > > > > I'm new in Django framework. I installed version 1.3.1 over Python 2.7.3 > in > > Ubuntu. > > I already did all steps but i have an error when i execute python > manage.py > > sql polls to create my table's project in mysql. > > > > Traceback (most recent call last): > > File "manage.py", line 14, in <module> > > execute_manager(settings) > > File > > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", > line > > 438, in execute_manager > > utility.execute() > > File > > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", > line > > 379, in execute > > self.fetch_command(subcommand).run_from_argv(self.argv) > > File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", > > line 191, in run_from_argv > > self.execute(*args, **options.__dict__) > > File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", > > line 219, in execute > > self.validate() > > File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", > > line 249, in validate > > num_errors = get_validation_errors(s, app) > > File > > "/usr/lib/python2.7/dist-packages/django/core/management/validation.py", > > line 35, in get_validation_errors > > for (app_name, error) in get_app_errors().items(): > > File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", > line > > 146, in get_app_errors > > self._populate() > > File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", > line > > 61, in _populate > > self.load_app(app_name, True) > > File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", > line > > 78, in load_app > > models = import_module('.models', app_name) > > File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line > > 35, in import_module > > __import__(name) > > File "/home/ewok/www/webapp_camposchilenos/polls/models.py", line 9, in > > <module> > > class Choice(models.Model): > > File "/home/ewok/www/webapp_camposchilenos/polls/models.py", line 10, > in > > Choice > > poll = models.ForeingKey(Poll) > > AttributeError: 'module' object has no attribute 'ForeingKey' > > > > I checked my module and everything seems ok: > > > > 1 from django.db import models > > 2 > > 3 # Create your models here. > > 4 > > 5 class Poll(models.Model): > > 6 question = models.CharField(max_length=200) > > 7 pub_date = models.DateTimeField('date published') > > 8 > > 9 class Choice(models.Model): > > 10 poll = models.ForeingKey(Poll) > > 11 choice = models.CharField(max_length=200) > > 12 votes = models.IntegerField() > > > It's a subtle spelling error: > poll = models.ForeingKey(Poll) > > should be > > poll = models.ForeignKey(Poll) > > cheers > L. > -- > ...we look at the present day through a rear-view mirror. This is > something Marshall McLuhan said back in the Sixties, when the world > was in the grip of authentic-seeming future narratives. He said, “We > look at the present through a rear-view mirror. We march backwards > into the future.” > > http://www.warrenellis.com/?p=14314 > > -- > 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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Thanks & Regards Stephen S Website: www.f2finterview.com Blog: blog.f2finterview.com Tutorial: tutorial.f2finterview.com Group: www.charvigroups.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-users@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.