Drop-in celery AbortableTask replacement

Source article: Drop-in celery AbortableTask replacement If you need to report progress updates from the tasks (or you call update_state in the task) you cannot use the bundled AbortableTask from celery.contrib.abortable because it relies on status updates too. That means you’ll get race conditions if you do that. You can use revokes for aborting tasks […]

Drop-in celery AbortableTask replacement*

Source article: Drop-in celery AbortableTask replacement* If you need to report progress updates from the tasks (or you call update_state in the task) you cannot use the bundled AbortableTask from celery.contrib.abortable because it relies on status updates too. That means you’ll get race conditions if you do that. You can use revokes for aborting tasks […]

Django pro tip: if you only use the admin

Source article: Django pro tip: if you only use the admin If you have a project that only exposes the admin you should just use the 500/404 templates from the admin. Put this in your project’s urls.py: from django.utils.functional import curry from django.views.defaults import server_error, page_not_found handler500 = curry(server_error, template_name='admin/500.html') handler404 = curry(page_not_found, template_name='admin/404.html') I […]

Django pro tip: if you only use the admin*

Source article: Django pro tip: if you only use the admin* If you have a project that only exposes the admin you should just use the 500/404 templates from the admin. Put this in your project’s urls.py: from django.utils.functional import curry from django.views.defaults import server_error, page_not_found handler500 = curry(server_error, template_name='admin/500.html') handler404 = curry(page_not_found, template_name='admin/404.html') I […]