Reputation: 2529
I am working on an application where end users need to be able to define queryset filters through an interface. These filters are used to select instances of a model to ship off to another web service at timed intervals. Contrived example:
class Thing(models.Model):
stuff = models.CharField()
I need users to be able to configure a timed task where only Thing
s with a value of test
for the stuff
field will be selected.
I currently have a working POC for this functionality, but it involves a lot of hand coded logic.
Given that django has such a rich community and ecosystem, I was wondering if I am missing an opportunity to do this in a simpler way.
Looking forward to your feedback!
Upvotes: 1
Views: 247
Reputation: 2445
If i understand your requirements correctly:
Thing
s should be selected - without any programming knowledge, just through a GUIBased on this premises, i would:
TimedTasks
which contain the relation to AdvancedFilter
and the webservice specsAdvancedFilter#query
in the task runner, set up and call the webserviceThis way the user can use the Overview page of Thing
to create his data filters, and can link them in the creation of TimedTask
along with the webservice config.
Upvotes: 2