[Django]-Versioning a TastyPie Api with the Accept header

4👍

Yes, you can use Accept headers or any other method to version your API, and do this in a way that is not specific to whatever Django API package you are using. One easy way to do this is to add some middleware to check for the headers on relevant requests and then load the appropriate URL conf depending on the version specified.

There are several simple apps on github that use URL routing middleware that you can customize to meet your needs.

Also, Tastypie is amazing and I highly recommend it over Piston after using both.

👤Spike

Leave a comment