Saturday, October 12, 2013

Re: Django 1.5 tutorial, part 1

Thank you, I'm lost in a glass of water.

Il giorno sabato 12 ottobre 2013 19:25:46 UTC+2, Vernon D. Cole ha scritto:
You have a spelling error in INSTALLED_APPS:  "pools" vs "polls".  You want a survey, not a puddle of water.
(This could be caused by an overly aggressive spelling corrector on your computer.)
--
Vernon

On Saturday, October 12, 2013 10:41:11 AM UTC-6, Enrico Battiston wrote:
Hi, i'm a first time user and i'm experiencing an error in the first part of the django 1.5 tutorial.
At the "Activating models" paragraph when i execute the command line "python manage.py sql polls" it return me: "ImportError: No module named pools".
Here the section INSTALLED_APPS of setting.py:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    # 'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'pools',
)

Here the content of models.py:

from django.db import models

# Create your models here.
class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

Here what i've in return if i execute "python manage.py shell --traceback":

Traceback (most recent call last):
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py", line 222, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/core/management/base.py", line 250, in execute
    translation.activate('en-us')
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 90, in activate
    return _trans.activate(language)
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 183, in activate
    _active.value = translation(language)
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 172, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 154, in _fetch
    app = import_module(appname)
  File "/Users/enricobattiston/Library/Containers/com.bitnami.django/Data/app/apps/django/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
ImportError: No module named pools

Here  what i've in return for the command line "django-admin.py version": "1.5"
And for the "python --version": "Python 2.7.3"

What to do?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a6b1f2bd-2134-439e-a6a7-d1ff377836d1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate