I know that will work, but what I can do to just make "python manage.py syncdb" work?
Thanks very much On Fri, Oct 14, 2011 at 2:37 AM, nicolas HERSOG <[email protected]> wrote: > You can also type python manage.py sqlall <yourApp> and copy paste sql > instructions in your bd > > On Fri, Oct 14, 2011 at 11:23 AM, Chen Xu <[email protected]> wrote: > >> Hi, >> I am new to Django. >> I have installed Django and go t everything set up correctly, just started >> some easy tutorials. >> >> So when I do >> Django-admin.py startapp blog >> >> >> it creates a /blog directory that looks like thsi >> /blog >> - __init__.py >> - tests.py >> - models.py >> - views.py >> >> I know in Django, when you run "python manage.py syncdb", it will look >> through models.py, and create all the table it finds. >> However, I dont want to create all my tables in models.py, becaue when my >> proj get bigger, it is hard to maintain. >> Therefore, I create a subdirectory "/Models" to store all my model >> >> /blog >> - __init__.py >> - tests.py >> - models.py >> - views.py >> /Models >> - __init__.py >> post.py >> >> so in my >> models.py: (only 2 lines) >> from django.db import models >> from blog.Models import post >> >> in my post.py: (only 3 lines) >> from django.db import models >> class post(models.Model): >> body = models.TextField() >> >> >> and then when I run "python manage.py syncdb" , it doesn't create the >> table "post" for me. >> >> Could anyone please help? >> >> >> >> >> Thanks very much >> Best regards >> >> >> -- >> ⚡ Chen Xu ⚡ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> 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. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > 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. > -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

