On Thu, 2006-08-03 at 13:25 -0700, Rob Hudson wrote:
> If anyone is still following along 

I am. Not a Mac or Windows user, but you're solving an interesting
problem. The end result is going to be useful. Thanks for sharing this
information.

> I got past the last error by
> specifically adding "django.db.backends.sqlite3.base" to my list of
> includes.  This got me a little further.  The server will successfully
> start up and I can make a request.  I got a traceback in the browser
> about django.middleware.common not existing so I added that to the
> include line.  The next one was django.contrib.sessions.middleware, so
> I added that too.  Here's the current list of includes:

That's going to get tiring quickly. Is there some way to pass this as a
Python list or something to py2app? Ideally, you would like to include
every directory under django/. The problem is that importing some of
this stuff requires a functioning settings file.

Have you had to set DJANGO_SETTINGS_MODULE somewhere in order to get
this all to work?

> python py2app-setup.py py2app
> --includes=django.contrib.auth,django.contrib.sessions,django.contrib.sites,django.contrib.admin,Quotes.quotes,django.db.backends.sqlite3.base,django.middleware.common,django.contrib.sessions.middleware
> 
> Currently in the browser I get the following error:
> 
> Traceback (most recent call last):
> 
>   File "django/core/servers/basehttp.pyc", line 272, in run
> 
>   File "django/core/servers/basehttp.pyc", line 615, in __call__
> 
>   File "django/core/handlers/wsgi.pyc", line 143, in __call__
> 
>   File "django/core/handlers/base.pyc", line 31, in load_middleware
> 
> ImproperlyConfigured: Error importing middleware
> django.contrib.sessions.middleware: "cannot import name backend"

Not sure if it will help you, but what it is really saying is "cannot
import <whatever the name of your database is> backend".

This is probably the silliest error message in Django. Unfortunately the
informative bit gets lost whilst moving up the stack to where we report
the error. I seem to remember it's not entirely trivial to fix, but it's
pretty embarrassing so we'll get to it one day.

So you have a real error here: something about the database layer not
being loadable.

[...]
> 
> I think this is as far as I'll get today.

I can only say "don't give up" here. Because of the way Django works
under the covers, with dynamic imports and the like, it is not entirely
trivial to work out what is going on: either for you or py2app, I
suspect.

So please feel free to ask as many questions as you need to. I can
understand that the learning curve here is a bit steep and this probably
isn't the part of your submission you want to spend days on. Like I say,
this is an interesting problem and worth solving, so we'll help you as
much as we can.

Cheers,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to