A Javascript library for parsing .xlsx files. It includes sample code along with demo for integration with AngularJS. Use cases include listing sheet names for selection in a form, showing preview of selected sheet etc.

Recently, I had to create a new web app, which would generate PDF reports based on data stored in excel worksheets. As usual, I used Django along with many other Python libraries for this.

It has following parts:

HTML Form - To select excel files and upload it to server

Parsing uploaded excel file - Basic validation followed by reading data from worksheets. I used xlrd module from Python-Excel project for this.

So, everything was working like a charm, except the fact that web app was reading data from first worksheet by index whenever an excel workbook was uploaded. But, user should be able to tell which worksheet to read from, right?

Building a RESTful api for user registration using django-tastypie. It includes a github project for Django 1.5 style custom User model along with explanation for each step.

So lately, I have been thinking to write about what I learnt in past 5-6 months.
I will force myself to write something fun and useful every once in a while,
mostly related to Django for next few weeks.

I worked with django-tastypie for last 2-3 months to implement RESTful API
for iOS applications. It involved implementation of an end point for creating
new users.

This is not something which is really documented, so here I'm sharing my experience.
In a nutshell, we need to override obj_create method of ModelResource and do
some validation on posted data. After few iterations I ended up with a code
which is easily maintainable with future relases of django-tastypie.

tl;dr

Check if all required fields are set in posted data.

Check if there is an existing user with same username or email address.