I really appreciate your help. I didn't see spelling mistake.
Thank you and have a nice day.
Rodrigo
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 <datakid@gmail.com> wrote:It's a subtle spelling error:On Fri, Oct 26, 2012 at 10:39 AM, Rodrigo Morgado
<rodrigo%ewok.cl@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()
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Thanks & RegardsStephen S
Website: www.f2finterview.comBlog: blog.f2finterview.comTutorial: tutorial.f2finterview.comGroup: 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
This email and any files transmitted with it are confidential and intended solely for the recipient named. If you have received this email in error please notify the sender immediately. Any disclosure, copying, or distribution of this message, or taking of any action based on it, is strictly prohibited. Failure to respect this prohibition may constitute a breach of law.
Este mail y cualquier archivo enviado adjunto son confidenciales y destinados solo a la utilización del individuo o entidad a la que van dirigidos. Sí usted ha recibido este mail por error, Favor bórrelo y notifique al remitente. Se prohíbe cualquier uso, copia o distribución de este mensaje o sus adjuntos. El no respetar esta prohibición puede constituir una infracción a la ley.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment