Supposedly django allows you to create an app with a directory called
models that contains files with model definitions in it. Instead of the
default models.py single file. I can't seem to get it to work I have
tracked down what seems to be the correct syntax for the __init__ file
but to no avail. Here is what I have:

projectfolder/
  appfolder/
     __init__.py
     models/
           __init__.py
           mymodels.py

In the __init__.py file in the models folder I have the line:
__all__ = ['mymodels',]

and the mymodels.py file has a simple model
from django.db import models
class SimpleTest(models.Model):
    name = models.CharField(maxlength=255)

In my settings file i included "projectfolder.appfolder" in my
installed apps. Then I run syncdb and no databases get created. I have
also tried to include "projectfolder.appfolder.models" in installed app
and still nothing.

Is there something simple I'm missing?

Thanks!


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

Reply via email to