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