nerdyator / feedjack

Automatically exported from code.google.com/p/feedjack
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Making a django ./manage.py command from feedjack_update.py #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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/comman
ds/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/s
end_mail.py

Original issue reported on code.google.com by roder...@gmail.com on 12 Feb 2010 at 12:39

GoogleCodeExporter commented 8 years ago
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.

Original comment by roder...@gmail.com on 15 Feb 2010 at 1:05

GoogleCodeExporter commented 8 years ago
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=bdf6a15431dd4
5f38aef07b04e2ff03947cbdf6e

Original comment by daniele....@gmail.com on 27 Oct 2010 at 8:02