Im really banging my head against a wall trying to get my threaded application to play nice with djangos ORM...
this is what my thread does for each iteration.. def run(self): while self.keepRunning: print repr(Topic.objects.get(id=1).content_set.order_by("- id")[0]) time.sleep(5) Now, the docs say that a query should evaluate when calling repr(), but it doesnt... what i do is start up my thread and in the shell: t = Topic.objects.get(id=1) eo = EntryObject(payload="Some random text") eo.save() e = Entry(content_object=eo, belongs_to=t) e.save() Still, the thread reports that the last object in content_set created is the one that is evaluated or printed when the thread does its first iteration.... what's going on here? What Im trying to accomplish is an application (just using Djangos ORM) that polls the database for new entries created, and based on that sends an message out on IRC. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---