Sure thing.
In several previous projects, they required the user to upload a file
via the browser (usually above 10mb), and this was then sent off into
the queuing system to be processed. Now, because of the huge amounts of
time it took to upload, we instead created a management command, which
did a file read directly from disk rather than requiring an upload each
time. At the same time, the command also spat out huge amounts of debug
during processing, so when we needed to figure out why the adapter (i.e.
the piece of code that was scanning for content inside the file) wasn't
working, we could easily do this without the overhead of uploading and
waiting for debug emails to come back from the queuing system.
As for the django shell, this is extremely useful for testing individual
pieces of code on the fly. It is a tad annoying that if any of the
python modules change after being imported, reload() doesn't seem to
play nicely all the time, so this usually means restarting the shell.
But, for things like model lookups etc, I find it a great deal easier
than writing huge chunks of SELECT SQL.
On 22/12/2010 22:12, ringemup wrote:
* If you want to test work flow, then try and make good use of the
"manage.py shell" and also the ability to create management
commands. This will allow you to quickly test code changes,
without having to do app restarts, or going through login
processes.
Cal, would you be willing to elaborate a bit on this point, or maybe
share an example?
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.