Wednesday, July 7, 2010

models.py import from other models.py

Hi, I'm beginner.

I tried to execute 'manage.py syncDB' command,
but it's not work.

My package is like ..

MyProject----Master---models.py
| ----Appli-----models.py


MyProject/Appli/models.py is ..
//-------------------------------------
from Master.models import WebBrowser

class Appli(models.Model):
# id
id = models.CharField(u'id', max_length=20, blank=False,
primary_key=True)
# support_browser
support_browser = models.ManyToManyField(WebBrowser,blank=True)

def __unicode__(self):
return self.name
----------------------------------------//

I tried that with comment out import from above code,it's work.

Is this bad design?

I wish to anyone help me.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate