Peter Bengtsson wrote:
>> Yep, that's prettymuch what I ended up writing. Wow, Django's ORM
>> expressions are ugly compared to SQLAlchemy ;-)
>>
> Then just
> import sqlalchemy
Yes, because that obviously provides a drop-in replacement for all users
of Django's ORM ;-)
> If the db is a legacy
On 20 Oct, 15:48, Chris Withers wrote:
> Shawn Milochik wrote:
> > I know this doesn't answer the hard part of your question, but here's
> > a simple way I delete old stuff from a database via an external script
> > that's run by cron:
>
> > Item.objects.filter(date_updated__lte = datetime.
Jaime Buelta wrote:
> When I had to do this kind of tasks, I've added a new management command and
> run it from the cron (or manually any time you need it, with params, etc).
> You can run it calling
>
> python manager.py miCommand parameters
>
"celery" may seem overkill initially, but works v
When I had to do this kind of tasks, I've added a new management command and
run it from the cron (or manually any time you need it, with params, etc).
You can run it calling
python manager.py miCommand parameters
The official documentation is not very complete, which is rare, but there
are some
Shawn Milochik wrote:
> I know this doesn't answer the hard part of your question, but here's
> a simple way I delete old stuff from a database via an external script
> that's run by cron:
>
> Item.objects.filter(date_updated__lte = datetime.now() - timedelta
> (days = 30)).delete()
Yep, th
buttman wrote:
> you could also do it this way:
>
> http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html
url whacking like that is pretty evil...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.
2009/10/11 buttman :
>
> you could also do it this way:
>
> http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html
Is there really much point to this instead of just putting all that
into a .py file and using cron to call the .py file instead? There
doesn't seem to b
I'm the author. Are you sure the comments are broken? I just made one
and it seemed to work.
On Oct 10, 11:55 pm, Kenneth Gonsalves wrote:
> On Sunday 11 Oct 2009 9:07:38 am buttman wrote:
>
> > you could also do it this way:
>
> >http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-dj
On Sunday 11 Oct 2009 9:07:38 am buttman wrote:
> you could also do it this way:
>
> http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-
>easy.html
interesting - but the author's commenting module is b0rked, so was unable to
add a comment (I hope he sees this and sets it
you could also do it this way:
http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html
On Oct 9, 5:56 am, Chris Withers wrote:
> Streamweaver wrote:
> > You could set this up as a custom manage.py command and run a cron on
> > that. Gives the advantage of both init
Chris,
I know this doesn't answer the hard part of your question, but here's
a simple way I delete old stuff from a database via an external script
that's run by cron:
Item.objects.filter(date_updated__lte = datetime.now() - timedelta
(days = 30)).delete()
If you use timedelta, you can eas
Streamweaver wrote:
> You could set this up as a custom manage.py command and run a cron on
> that. Gives the advantage of both initiating from outside the app and
> using Django's DB abstraction layer.
That's prettymuch what I was planning to do :-)
> Then just iterate over the month names mor
You could set this up as a custom manage.py command and run a cron on
that. Gives the advantage of both initiating from outside the app and
using Django's DB abstraction layer.
A very simple way to do this would be to put all month text names in
order in a tuple.
i.e. monthnames = ('jan', 'feb
Tim Chase wrote:
> I wouldn't try to do it from within the web app itself --
> I'd schedule some wee-hours cron job to do the deletion.
I plan to, don't worry ;-)
But, I would like to do it from within the Django environment to make it
immune to changes of database...
> 6mo boundary. Your Mont
> I only want to keep 6 months worth of data. How can I
> efficiently delete a month and all it's associated
> services and those services associated pages? (in this
> app, there could be about 3 million pages that are
> associated with each month though a bunch of service
> objects)
I woul
15 matches
Mail list logo