New issue 39 by roderikk: Making a django ./manage.py command from
feedjack_update.py
http://code.google.com/p/feedjack/issues/detail?id=39
Now that Django allows apps to create custom command wouldn't it be an
option to run feedjack_update like:
./manage.py feedjack_update [OPTIONS]
It seems this shouldn't be too complicated by looking at the source of
runserver:
http://code.djangoproject.com/browser/django/trunk/django/core/management/commands/runserver.py
More here:
http://docs.djangoproject.com/en/dev/howto/custom-management-commands/
Looking at the code of django-mailer for an example that is quite analogous
to what feedjack is trying to do:
http://github.com/jtauber/django-mailer/blob/master/mailer/management/commands/send_mail.py
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
I have created a clone and updated the code to reflect the changes. From my
limited
testing it seems to work. The code could use a refactoring whereby the bin
directory
is cleared out and everything is moved to the new command structure. I have
now
decided to change as little as possible however.
roderikk: I've seen your implementation, but it duplicates a lot of code.
I've implemented an admin command too, available from my clone at
https://code.google.com/r/danielevarrazzo-feedjack/source/browse which
imports the object from the script (with a little refactoring to expose the
options parser) and uses the same code.
Patch is at
https://code.google.com/r/danielevarrazzo-feedjack/source/detail?r=bdf6a15431dd45f38aef07b04e2ff03947cbdf6e