My model declaration is:
class Media(models.Model):
binary = models.FileField(upload_to=resolve_file_path)
mimetype = models.CharField(max_length=64, editable=False)
media_for = models.ForeignKey(Entry)
Now if I in my testcase create an instance of Media, how/what do I
assign to the '
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])
(from django) applications but suggestions have been to
do cron jobs or use views in django to trigger an eventflow. These
things aren't always applicable tho, as in my case where i have to
keep a connection up on IRC while polling.
On Jul 6, 4:50 pm, ejot <[EMAIL PROTECTED]> wrote:
I can answer for the settings part :)
Make sure your project is in your PYTHONPATH environment variable and
that DJANGO_SETTINGS_MODULE also exists as an environment variable.
See
http://www.djangoproject.com/documentation/settings/#designating-the-settings
On Jul 8, 7:15 am, Carl Karsten <[EMA
solve my problem?
On Jul 7, 3:08 am, ejot <[EMAIL PROTECTED]> wrote:
> Hmm, Im guessing this might also have something to do with local() for
> threads?
>
> Made my app work by using an extra and from my point of view
> uneccesary worker thread that does the polling on the database
5 matches
Mail list logo