Archive for the 'Web Development' Category

Build a scalable feed using Stream-Framework and Django

It’s been a year since the original version of this blogpost was written and it’s time for an update. The Stream-Framework is currently the largest open source solution for building newsfeed. This post will point you in the right direction if you want to build a newsfeed using Stream-Framework and Django.

We’ll be building an example app like this Pinterest style demo.

Besides the open source Stream Framework we also offer a hosted solution for building newsfeed applications at The example application code for the hosted version can be found on Github.

For the open source framework the example app code can be found here.

Django &Python &Scaling &Web Development tschellenbach 18 Oct 2013 275 Comments

Django Facebook – 1.5 and custom user model support

Django Facebook now officially supports Django 1.5 and custom user models! Go try it out and upgrade to pip version 5.1.1. It’s backwards compatible and you can choose if you want to keep on using profiles, or migrate to the new custom user model. Installation instructions can be found on github.


Thanks for all the contributions! My startup (Fashiolista) depends on a reliable Facebook integration and maintaining it would not be possible without all the pull requests from the community. Contributions are strongly appreciated. Seriously, give Github a try, fork and get started :)

About Django Facebook

Django Facebook enables your users to easily register using the Facebook API. It converts the Facebook user data and creates regular User and Profile objects. This makes it easy to integrate with your existing Django application.

I’ve built it for my startup and it’s currently used in production with thousands of signups per day. For a demo of the signup flow have a look at Fashiolista’s landing page (

After registration Django Facebook gives you access to user’s graph. Allowing for applications such as:

  • Open graph/ Timeline functionality
  • Seamless personalization
  • Inviting friends
  • Finding friends
  • Posting to a users profile

Django Facebook helps you quickly develop Facebook applications using Django.
Let me know what features or issues you are encountering!

Django &Facebook &Fashiolista &Python &Web Development tschellenbach 11 May 2013 165 Comments

Django Facebook hotfix, update to 5.0.13

Last night Facebook changed the format they use for codes. (codes are an intermediate step in the process of requesting access tokens.)

This change broke the caching for the convert code step for Django Facebook, breaking login, connect and registration functionality. Fortunately this was quickly reported by developers in a country where there was no Queensday yesterday.

I encourage everybody to update to 5.0.13 to make sure your Facebook integration keeps on working.

Django &Facebook &Fashiolista &Python &Web Development tschellenbach 01 May 2013 122 Comments

Performance metrics for a social network

This is a talk I gave at the Amsterdam Performance Meetup.

The presentation starts by introducing Fashiolista.
It still amazes me and 3 other guys started Fashiolista and grew it to the 2nd largest online Fashion community.
I guess Marc Andreesen had a point in his “Why Software Is Eating The World” article.

The talk focuses on how we use metrics to drive optimization at Fashiolista.
And narrows down on tools like:

If you’re looking up the links from the presentation, these are the most notable ones:

The Presentation

Performance metrics for a social network from Thierry Schellenbach

Django &Events &Fashiolista &Performance &Python &Scaling &Web Development tschellenbach 22 Aug 2012 58 Comments

Facebook open graph publishing simplified

Facebook has just enabled the open graph for 60 lucky apps. The new open graph beta allows you to post a user’s actions to their timeline. This activity is shown to the user’s friends in Facebook’s newsfeed and ticker. Furthermore your data is nicely aggregated on a user’s Facebook profile. Fashiolista’s aggregation for instance looks like this:

Posting these actions on Facebook can greatly enhance the viral growth of your company. Spotify, one of the launch partners, has grown by more than 4mil active users. This blogpost explains how to use Django Facebook to integrate your Django based site with Facebook.

How open graph works

Before going into the code though we need to understand the basic concepts of the open graph: actions and objects. Facebook’s getting started interface explains it best:

Actions are the verb, objects are what the action is applied to. You submit the data for these actions and objects to Facebook. An example would be watching (action) the movie Pan’s Labyrinth (object). Every object should be represented by a dedicated URL. For instance if you look at Chiara’s profile (object) on Fashiolista you will see the following open graph data:

<meta property="og:title" content="ChiaraFerragni" />
<meta property="og:image" content="" />
<meta property="og:type" content="fashiolista:fashiolista" />
<meta property="og:site_name" content="Fashiolista" />

To post to the open graph you specify an action and the url for the object. You can read more about it in Facebook’s open graph docs.

Getting permission

Users only need to give you permission to the open graph once. You specifically need the publish_actions permission. When asking for this permission a pretty permission interface as shown below will appear:

Notice the tiny add to timeline box displayed at the bottom right corner of the interface.

Posting to the graph

The code below will show you how to post to the open graph. There are however a few requirements which you’ll need to go through.

  1. Register your own Facebook app and define actions and items
  2. Have Django Facebook installed

Simple posting to the graph

After receiving this permission we can post to the user’s timeline. Below is the most basic example:

def open_graph_beta(request):
    Simple example view on how to do open graph postings
    fb = get_persistent_graph(request)
    entity_url = ''
    result = fb.set('me/fashiolista:love', item=entity_url), 'The item has been shared to fashiolista:love')

This posts the action love to the users timeline with the object data found at the url
The syntax me/fashiolista:love translates to post to me in the namespace fashiolista with the action love.

Asynchronous posting to the graph

While the above example works, you often won’t want to keep your users waiting for the Facebook API request. Especially since they are quite sluggish at the moment.
Below there’s a version of the code using celery. Celery is a task queuing system which enables you to run tasks asynchronously.

def open_graph_beta(user):
    Example posting to open graph using a celery task
    profile = user.get_profile()
    fb = profile.get_offline_graph()
    entity_url = ''
    result = fb.set('me/fashiolista:love', item=entity_url)


Integrating with open graph is easy. Head over to the github page of Django Facebook to get started. Contributions are more than welcome.

Fashiolista Jobs

Do you also see the beauty in clean code? Are you experienced with high scalability web apps? Currently we’re looking for additional talent over at our Amsterdam office. Feel free to drop me a line at my personal email for more information: thierryschellenbach[át]

Business &Django &Facebook &Fashiolista &Marketing &Python &Web Development tschellenbach 01 Feb 2012 81 Comments

5 ways in which Facebook redefines online marketing

In the last few years the landscape for online marketing has shifted towards Facebook. The most obvious point is Facebook’s own ad platform, which currently exceeds 2 billion dollar in revenue. However the more fundamental changes are caused by Facebook’s social platform. This article outlines the 5 ways in which Facebook is redefining online marketing.

About Thierry Schellenbach: Co-Founder of, author of Django Facebook. Follow me on Twitter or Facebook

1. Interest based marketing

Firstly Facebook allows you to target your advertising to specific interest groups. Especially for community driven sites it’s now possible to reach your target audience with almost scary precision. A marketeer can target all single girls living in Amsterdam, which like snowboarding and work at Google. This improved targeting enables you to attract visitors which are more likely to use your product.

Try out Facebook advertising

2. Zero friction authentication

The Facebook effect continues when users reach your landing page. Instead of filling out a form with annoying questions, users just need to find the big blue button on your site and they are good to go.
Having a Facebook login flow on your site drastically increases your conversion to members. Also the Facepile social plugin shows you which of your friends are using the site you’re visiting. This creates another incentive for users to join your site.

A good example of a zero friction signup flow is the Fashiolista landing page as shown above.

3. Instant personalization and Friends

The first two points allow you to acquire more users at a substantially lower member acquisition cost than previously possible. In addition the user accounts created by the Facebook connect flow immediately contain very rich information. You know their birthday, their age, their email, their gender and more importantly their real name. Using real names on online platforms substantially reduces spam and trolling. Furthermore since you know the user’s Facebook id you can connect them to their friends.

Pinterest for instance makes it extremely easy to follow your Facebook friends on Pinterest.

4. Like based personalization

Facebook started focusing on likes about a year and a half ago when they released the open graph protocol and like buttons. Currently many users have indicated which sports, movies and brands they like. You can utilize this data to immediately connect the users to topics they care about.

Quora is the leading example on how to personalize your content to new users. When you join Quora topics will be suggested to you based on your interests. So someone interested in Entrepreneurship will see entirely different content than someone interested in gardening.

5. Social sharing – Evangelists

Some of these users you just acquired will absolutely love your product. (Stop marketing and improve your product if they don’t). Previously these users would maybe email a friend or two and if you’re lucky tell their colleagues about it. Facebook however empowers them to easily share your product to all of their friends. Evangelists which would maybe recruit two new members are enabled by Facebook to recruit dozens. It is very common for user’s of Fashiolista to invite more than 30 of their friends, many of which become members.

The invite flow on Fashiolista smartly shows your female friends, which are not yet on Fashiolista and enables you to quickly send an invite message to their wall.
Similar, albeit less pretty invite flows are a strong component of games like CityVille and Farmville.

Conclusion and on to F8

Facebook has so far reduced the cost of getting visitors to your site. In addition it has become easier for these visitors to become members and receive a personalized experience.
Finally Facebook empowers your evangelists to reach more of their friends than was previously possible. Throughout these steps the cost and friction involved with recruiting new members have been substantially reduced.

On September 22nd Facebook will make several announcements at their F8 conference.
Have a look at the livestream to find on how they will change online marketing again.

About Thierry Schellenbach: Co-Founder of, author of Django Facebook. Follow me on Twitter or Facebook

Business &Facebook &Fashiolista &Marketing &Web Development tschellenbach 21 Sep 2011 63 Comments

Amsterdam based, VC funded startup, Fashiolista looking for new team members

Over the past months Fashiolista has grown to be one of the largest fashion communities worldwide. Dividing attention between scaling the site and creating new features has been quite a challenge. We are looking for a very experienced django developer to join our team.

About Fashiolista

Fashiolista is best described as “twitter for fashion”. Girls follow each other’s fashion finds and indicate which items they love. We are funded by Atomico ventures and several high profile angel investors.

Why you will love working at Fashiolista

– Young team, startup culture
– Developers in the founding team
– The team has been working with Django for more than 4 years
– Modern stack (Django 1.3, postgres, redis, memcached, jquery, celery, solr, GIT)
– Learning culture

Did I mention we are located in the centre of Amsterdam?

Who we are looking for

We are looking for a talented Django developer with experience in building highly scalable applications. Since our team is small, strong experience with Linux or Freebsd system administration would be a big plus.

  • Experienced with Django and Python (> 3 years preferably)
  • Knowledge of SQL and query optimization
  • Javascript experience
  • Test driven development
  • Memcached and other caching techniques
  • GIT

Bonus points for:

  • Knowledge of FreeBSD or Linux system administration
  • Redis/ NoSql experience
  • SOLR experience
  • Postgres Trigger experience
  • Celery experience
  • CS degree

For this position you need to be willing to work in The Netherlands/ Amsterdam. Furthermore the position is full time.

To conclude

We are looking for someone with an excellent work attitude and considerable experience. It doesn’t matter if you are a student, cum laude graduate, or drop out, as long as you’re extremely passionate about what you do. You will be working in a startup and we expect your input on a wide range of challenges.

If you recognize yourself in the above description or would like more information please contact me at:

Django &Fashiolista &Python &Web Development tschellenbach 15 Aug 2011 23 Comments

Next Page »