Django app that will allow you to track the output's from management commands.
- Add
management_logging
toINSTALLED_APPS
insettings.py
INSTALLED_APPS = (
# other apps
'management_logging',
)
- Include
management_logging.urls
in yoururls.py
urlpatterns += patterns('',
url(r'^management-logging/', include('management_logging.urls')),
)
Run migrations to create database tables::
python manage.py migrate management_logging
from management_logging.command import CommandwithLogging
class MyCommand(CommandwithLogging):
name = 'Name of my command'
pip install django-rq
pip install git+git://github.com/UKTV/django-rq-scheduler@v1.1.2#egg=django-rq-scheduler-1.1.2
INSTALLED_APPS = (
# other apps
'django_rq',
'scheduler',
)
python manage.py rqworker default --worker-class=management_logging.worker.LoggingWorker
The report will show you the status of the latest run of each management command. You have to be logged in to see the report
- The output in the render isnt always HTML so added a try except
- Added in CSS to wrap text in the admin
- Fix to pass through args and options to management command
- Close all connections after its run to prevent MySQL server has gone away error
- For the assets get the STATIC_URL
- Need to implement a flush method
- Initial setup