Obviously it can be done. Just make sure to add the app to your INSTALLED_APPS and use the proper path while importing. Things should go fine if properly done.
Thanks, Subhranath Chunder. On Mon, Jul 19, 2010 at 1:28 AM, Andreas Pfrengle <[email protected]>wrote: > Hello, > > is there a possibility to import a model into models.py from any other > module? In my models.py I'm trying to do: > > #models.py: > from _external_modules.django_timer import Tim > > #django_timer.py: > from django.db import models > print 'test' > class Tim(models.Model): > <code> > > This should import a database-based timer I've written. In fact, code > from django_timer seems to be imported, since 'test' is printed when I > execute "manage.py syncdb" - however, the database table is not > created. Why? What would I need to change to make it work (except copy- > paste the code into my models.py)? > > Thanks for answers, > Andreas > > -- > 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]<django-users%[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.

