If you use contenttypes without auth in INSTALLED_APPS (eg, being
used) it seems the auth models still get installed. When you run
syncdb with a state content type, it will prompt to delete the stale
CT entry and the Permission model tries to clean up:

  File "/home/wk/projects/rootproj/django/core/management/commands/
syncdb.py", line 105, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File "/home/wk/projects/rootproj/django/core/management/sql.py",
line 190, in emit_post_sync_signal
    interactive=interactive, db=db)
  File "/home/wk/projects/rootproj/django/dispatch/dispatcher.py",
line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/wk/projects/rootproj/django/contrib/contenttypes/
management.py", line 48, in update_contenttypes
    ct.delete()
  File "/home/wk/projects/rootproj/django/db/models/base.py", line
578, in delete
    collector.collect([self])
  File "/home/wk/projects/rootproj/django/db/models/deletion.py", line
143, in collect
    if not sub_objs:
  File "/home/wk/projects/rootproj/django/db/models/query.py", line
113, in __nonzero__
    iter(self).next()
  File "/home/wk/projects/rootproj/django/db/models/query.py", line
107, in _result_iter
    self._fill_cache()
  File "/home/wk/projects/rootproj/django/db/models/query.py", line
766, in _fill_cache
    self._result_cache.append(self._iter.next())
  File "/home/wk/projects/rootproj/django/db/models/query.py", line
273, in iterator
    for row in compiler.results_iter():
  File "/home/wk/projects/rootproj/django/db/models/sql/compiler.py",
line 680, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/home/wk/projects/rootproj/django/db/models/sql/compiler.py",
line 735, in execute_sql
    cursor.execute(sql, params)
  File "/home/wk/projects/rootproj/django/db/backends/util.py", line
18, in execute
    return self.cursor.execute(sql, params)
  File "/home/wk/projects/rootproj/django/db/backends/
postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "auth_permission" does not
exist
LINE 1: ...ntent_type_id", "auth_permission"."codename" FROM
"auth_perm...

What's odd is that the tables correctly never get installed. Is
contenttypes not available for projects not using auth?

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