*Background* I am working with python 2.6 and django 1.2 on an OSX
10.6 ("snow leopard") box.  I am using fastcgi, not the development
server.  The machine does not have the python/mysql linkage, and I
have had troubles installing it, so I am trying to use sqlite3.  I
have an existing project, which worked with mysql before, so I suspect
the code is at least halfway right.  But I am having problems with
sqlite3, relating (I think) to permissions.

If I do
   python manage.py syncdb
as myself, it creates a database, but then the web server (named _www
on this machine) cannot access it.  I've tried using chmod +a to give
_www more permissions but I get errors when I do that.  I've also
tried doing::

  sudo -u _www python manage.py syncdb

but that gives  a problem with django_content_type (transcript at end
of message).

*Question* can anyone recommend a method for setting up the sqlite3
database, with fcgi instead the development server?  (PS. it passes
'manage.py test'.)

The error log::

Creating table django_admin_log
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table dreams_dream
Creating table dreams_profanity
Creating table tags_tag
Creating table userprofiles_userprofile
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Library/Python/2.6/site-packages/django/core/management/
__init__.py", line 362, in execute_manager
    utility.execute()
  File "/Library/Python/2.6/site-packages/django/core/management/
__init__.py", line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.6/site-packages/django/core/management/
base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.6/site-packages/django/core/management/
base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.6/site-packages/django/core/management/
base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/Library/Python/2.6/site-packages/django/core/management/
commands/syncdb.py", line 99, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File "/Library/Python/2.6/site-packages/django/core/management/
sql.py", line 205, in emit_post_sync_signal
    interactive=interactive)
  File "/Library/Python/2.6/site-packages/django/dispatch/
dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Library/Python/2.6/site-packages/django/contrib/auth/
management/__init__.py", line 25, in create_permissions
    ctype = ContentType.objects.get_for_model(klass)
  File "/Library/Python/2.6/site-packages/django/contrib/contenttypes/
models.py", line 31, in get_for_model
    defaults = {'name': smart_unicode(opts.verbose_name_raw)},
  File "/Library/Python/2.6/site-packages/django/db/models/
manager.py", line 123, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)
  File "/Library/Python/2.6/site-packages/django/db/models/query.py",
line 328, in get_or_create
    return self.get(**kwargs), False
  File "/Library/Python/2.6/site-packages/django/db/models/query.py",
line 300, in get
    num = len(clone)
  File "/Library/Python/2.6/site-packages/django/db/models/query.py",
line 81, in __len__
    self._result_cache = list(self.iterator())
  File "/Library/Python/2.6/site-packages/django/db/models/query.py",
line 238, in iterator
    for row in self.query.results_iter():
  File "/Library/Python/2.6/site-packages/django/db/models/sql/
query.py", line 287, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/Library/Python/2.6/site-packages/django/db/models/sql/
query.py", line 2369, in execute_sql
    cursor.execute(sql, params)
  File "/Library/Python/2.6/site-packages/django/db/backends/util.py",
line 19, in execute
    return self.cursor.execute(sql, params)
  File "/Library/Python/2.6/site-packages/django/db/backends/sqlite3/
base.py", line 193, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: django_content_type

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to