Friday, March 25, 2016

Re: Simple subprocess help

On 26/03/2016 1:05 AM, Joshua Valdez wrote:
> I'm very new to django

Sorry I didn't pay attention to this part of your question ...

To amplfy my response, this is the sort of thing I would do in the save
method of the model:

from wherever import run_pipeline

class Query(models.Model):
...
def save(self, *args, **kwargs):
if self.problem:
self.intervention = run_pipeline(self.problem)
super(Query, self).save(*args, **kwargs)


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56F5F9FF.9040604%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment