Skip to main content

Posts

Sentry Integration with OpenedX / Django application.

Open-edX/Django Application: Monitoring  Hi, Once again welcome to blog, If you want to provide a reliable service, it’s extremely important to be aware of when things are going wrong on the website. Sentry  is a wonderful free system to catch Python exceptions. For Django, we use  raven  to catch and report the errors back to Sentry.  1. To Integrate  Sentry with your Django application, all you need to do is : Sign-up with Sentry   & go to dashboard/ Page.  Create a Sentry project for your application.  Then go to settings -> error tracking -> Django -> you should see dsn value already filled for you for that project.  Do changes in your settings file:   RAVEN_CONFIG = {                                   'dsn':        ' https:// ******** @sentry.io/<project> ',   ...

Django version 2.0 // A Few Key Features

    Hi, In this post from time to time as I uncover new things about Django version 2.0. This post will not be exhaustive since the  release notes  are. Something else that's important to note: this post is mainly for our content. If you're randomly finding this, you might be wondering why we left out a few things. It's simple: the things below I know will have an immediate impact for our students looking to move to Django 2.0 (but remember always follow the version in the videos!) Enjoy. New Starter page! The image above, that's the new default starter page. Ahhh much better. is_authenticated()  is now  is_authenticated Example: # < 2 .0 request .user .is_authenticated () # 2 .0 request .user .is_authenticated reverse  moved # < 2.0 from django.core.urlresolvers import reverse # 2.0+ from django.urls import reverse django.core.urlresolvers  is now simply  django.urls on_delete  is now req...

Getting started with Celery and Redis

Points will be coverd -> When to use Celery. Why to use Celery. A simple celery program. Having a slow script and making it faster using celery. Celery configuration and code in different files. Using celery with tasks spanned across multiple modules Using celery with a package. Redis and celery on separate machine Web-application/script and celery on separate machines. When to use Celery Celery is a task processing system. It is useful in a lot of web applications. It can be used in following scenarios. To do any network call in a request-response cycle. Server should respond immediately to any web request it receives. If some network call is required during a request-response cycle, it should be done outside of request-response cycle. eg: An activation email needs to be sent when user signs up on a site. Sending the email is a network call and might take 2-3 seconds. User should not be made to wait for these 2-3 seconds. So sending activation email should be d...