Now that the magic has been removed, and Django released 0.95, I decided to 
start porting my applications over.  I knew the merge of magic-removal was 
coming, so I never deployed the apps.  So, I decided to dump the tables that I 
had (there was no useful information in them) and start over.  Well, my project 
had the following in the settings file:
  INSTALLED_APPS = (
    'django.contrib.*',
    'www.apps.blog',
    'www.apps.jobs',
  )

When running 'django-admin.py syncdb', it was failing with the following error:
Creating table django_flatpage
Creating many-to-many tables for FlatPage model
Traceback (most recent call last):
  File "/Users/jszakmeister/projects/django/django/bin/django-admin.py", line 
5, in <module>
    management.execute_from_command_line()
  File "/Users/jszakmeister/projects/django/django/core/management.py", line 
1251, in execute_from_command_line
    action_mapping[action]()
  File "/Users/jszakmeister/projects/django/django/core/management.py", line 
485, in syncdb
    cursor.execute(statement)
  File "/Users/jszakmeister/projects/django/django/db/backends/util.py", line 
12, in execute
    return self.cursor.execute(sql, params)
psycopg.ProgrammingError: ERROR:  relation "django_site" does not exist

CREATE TABLE "django_flatpage_sites" (
    "id" serial NOT NULL PRIMARY KEY,
    "flatpage_id" integer NOT NULL REFERENCES "django_flatpage" ("id"),
    "site_id" integer NOT NULL REFERENCES "django_site" ("id"),
    UNIQUE ("flatpage_id", "site_id")
);

The problem is that the tables for django.contrib.sites aren't created before 
the flatpages tables.  I made a simple change to the settings file to include 
the sites app before the others, so it was an easy fix.

The reason I bring it up at all is that if were going to allow a wildcard, it 
seems reasonable to expect that interdependencies are going to be worked out, 
and the tables will be created in the right order.  Otherwise, the wildcard 
loses some of it's appeal.  Is there a simple way to extract the dependencies 
on other apps models, before the tables are created?  If so, I can take a stab 
at fixing syncdb to Do The Right Thing.  If not, is it suffucient to leave 
things as they are, or should the wildcard import be removed completely?  

Thanks!

-John


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to