Viewing posts by lee

Get google plus or facebook avatars with python-social-auth

The python-social-auth app uses pipelines to help developers add in their own functions during association, authentication and disconnection of users. If you have a user profile model associated with your user model and want to grab the google-plus or facebook avatars and save them to your model, it is possible ...

Read more

Signing a user in (initial step in Hybrid flow) and out of your site with Google-plus

How to sign-out a user who has logged into your with Google-plus. This is tricker than you might expect when the sign-out is to be done a page where you don't want to include the magical Google sign-in button (e.g. a user profile page with a logout link on it say). If you just call the `gapi.auth.signOut()` function nothing happens. I talk through a few ways of implementing this signout in these cases. Read more

Comparing google-plus sign-in flows and OAuth 2.0

In this post I compare the google-plus sign-in flows such as client-side, pure server-side and hybrid flows with the OAuth 2.0 grant types Autherization Code and Implicit. Read more

Sharing variables between celery workers

Sometimes you may want to share a variable between your Celery workers.

Read more

Displaying only subset of model's fields for certain group in Django admin

Recently, I was asked how to exclude fields in the Django admin for non-superusers, or how to exclude fields for a model for a given group. In other words to create a solution so that certain fields in a Django model could only be edited in the admin by superusers ...

Read more