Re: import model from other module

2010-07-22 Thread Andreas Pfrengle
David, thanks for the explanation. It suddenly reminds me of the django tutorials or first chapters I've read probably 3 years ago. That's surely the right way to do it. I will try that next week. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: import model from other module

2010-07-21 Thread David De La Harpe Golden
On 20/07/10 20:04, Andreas Pfrengle wrote: > I've tried it with and without installing in settings.INSTALLED_APPS, > didn't work, table wasn't created vis syncdb. > > David, nevertheless the link you've posted gave me the clue how to > solve the problem. I've defined my external module's class a

Re: import model from other module

2010-07-20 Thread Andreas Pfrengle
I've tried it with and without installing in settings.INSTALLED_APPS, didn't work, table wasn't created vis syncdb. > This might be the info you're > missing:http://docs.djangoproject.com/en/dev/ref/models/options/#app-label This seems to work, however, since I want to use my external modules for

Re: import model from other module

2010-07-20 Thread Andreas Pfrengle
I've tried it with and without installing in settings.INSTALLED_APPS, didn't work, table wasn't created vis syncdb. > This might be the info you're > missing:http://docs.djangoproject.com/en/dev/ref/models/options/#app-label This seems to work, however, since I want to use my external modules for

Re: import model from other module

2010-07-19 Thread David De La Harpe Golden
On 18/07/10 20:58, Andreas Pfrengle wrote: > 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

Re: import model from other module

2010-07-18 Thread Subhranath Chunder
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 wrote: > Hello, > > is there a possibility to import a mod

Re: import model from other module

2010-07-18 Thread Martin Tiršel
On Sun, 18 Jul 2010 21:58:15 +0200, Andreas Pfrengle wrote: 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)? Hello, do you have it in INSTALLED_APPS ? Regards

import model from other module

2010-07-18 Thread Andreas Pfrengle
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): This should import a datab