On 7/21/07, james_027 <[EMAIL PROTECTED]> wrote: > > I dont know what you mean by what_I_have_done?
Help me to replicate exactly the steps that you have taken to make this problem occur. I have your model file. If _I_ use that model file, and it works fine for me. Obviously you have done something different somewhere else. What is it? The only way to work that out is for you to tell me EVERYTHING you have done. For example: - I created a new project with ./django-admin.py startproject myproject - I created a new application with ./manage.py startapp myapp - I created a MySQL database using InnoDB tables - I modified models.py to look like .... and so on, listing EVERY change you have made. > I just follow the django tutorial. the one with poll and choice model. > I did every step. and that's my result. No, you didn't 'just follow the django tutorial'. If you had followed the Django tutorial, your models file would have contained two models named Poll and Choice, not a single model called Profile. I can't read your mind to work out which steps you changed, and how you changed them. Help me to retrace your steps. > However I have discover something .... ... > will produce a different result ... the first setting will have > foreign key on the django_admin_log table while the 2nd table dont > have the foreign key. I have do this multiple time, changing the > settings between the first and the second and the result is constant. There will be differences in the SQL that is generated, but that's only because of the handling of forward references. I've tried creating the tables for the two INSTALLED_APPS settings you describe. I'm not a MySQL expert, but as far as I can make out, I'm getting exactly the same tables created both ways. The only issue I can think of that could be affecting this is ticket #2720 [1] - if I remember correctly, if you're using InnoDB tables, the foreign key column is created, but the constraint is not. Which brings me back to my other question - exactly what do you mean when you say 'the 2nd table doesn't have the foreign key', and how did you come to this conclusion? Can you provide any output to show me exactly what has been created on the database (e.g., the result of running "describe django_admin_log" at an SQL prompt) [1] http://code.djangoproject.com/ticket/2720 Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---