#14143: Database problems and import error of django.contrib.messages
------------------------------------+---------------------------------------
          Reporter:  Robbington     |         Owner:  nobody
            Status:  closed         |     Milestone:        
         Component:  Uncategorized  |       Version:  1.2   
        Resolution:  invalid        |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by kmtracey):

  * status:  new => closed
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0
  * resolution:  => invalid

Old description:

> Hi, I am using django1.2 and django-cms on ubuntu 10
>
> Have been using and teaching myself django for a few months now with
> minimal complaint, but I've just started a new project and things have
> been acting very strangly.
>
> Basically I started a new project, configured everything and linked it to
> my database, sync-ed everything and got the admin working fine. Wrote a
> new blog app worked out the kinks by importing it in the manage.py shell
> until it all worked fine and added it to my installed apps and went to
> sync but get:
>
> django.core.exceptions.ImproperlyConfigured?: You haven't set the
> DATABASE_ENGINE setting yet.
>
> Now I know what this means normally, but as I said I had previously
> synced the admin and got everything working, all that I had changed was
> adding the model to my installed apps.
>
> Here is the exert from my settings.py:
>
> DATABASES = {
>
> 'default': {
>
> 'ENGINE': 'sqlite3',
>
> ......
>
> About the same time manage.py shell throws up no module named messages.
> Checked and for some reason django.contrib.messages is no longer on the
> python path. Added it location to .pth file in the dist-packages, but
> still it cant find it. I had a similar problem importing contrib.page
> module and had to re-install everything but it finds pages fine now.
>
> Any ideas?

New description:

 Hi, I am using django1.2 and django-cms on ubuntu 10

 Have been using and teaching myself django for a few months now with
 minimal complaint, but I've just started a new project and things have
 been acting very strangly.

 Basically I started a new project, configured everything and linked it to
 my database, sync-ed everything and got the admin working fine. Wrote a
 new blog app worked out the kinks by importing it in the manage.py shell
 until it all worked fine and added it to my installed apps and went to
 sync but get:

 {{{

 django.core.exceptions.ImproperlyConfigured?: You haven't set the
 DATABASE_ENGINE setting yet.

 }}}

 Now I know what this means normally, but as I said I had previously synced
 the admin and got everything working, all that I had changed was adding
 the model to my installed apps.

 Here is the exert from my settings.py:


 {{{
 DATABASES = {

 'default': {

 'ENGINE': 'sqlite3',

 ......

 }}}
 About the same time manage.py shell throws up no module named messages.
 Checked and for some reason django.contrib.messages is no longer on the
 python path. Added it location to .pth file in the dist-packages, but
 still it cant find it. I had a similar problem importing contrib.page
 module and had to re-install everything but it finds pages fine now.

 Any ideas?

Comment:

 Fixed formatting, please use WikiFormatting and preview before submitting.
 Also this problem is almost certainly a configuration problem on your
 machine, so would better be direction to the django-users mailing list or
 #django irc channel.

 Both of the errors you mention would happen if your PYTHONPATH was
 pointing to a pre-1.2 Django: your 1.2 style database definitions would
 not be recognized and the new 1.2 messages module would not be found. So I
 suspect somehow your environment has been changed and you are no longer
 picking up the right version of Django for your project.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14143#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to