Relative Content

Tag Archive for pythondjangomodelmultiprocessing

How to import and use Django models inside new process outside views.py

I have some models inside ‘models.py’ inside ‘app1’ :

class ChitaMoney(models.Model):
chita_market = models.CharField( verbose_name=_(‘chita market name’), max_length=20 )

my ‘views.py’ calls a function from ‘multy.py’ from ‘core’ directory inside ‘app1’
‘multy.py’ startes a new infinite process .
when the process whants to import the models: