Blog / Django

Some tips with integrating Stripe with a subscription-based Django application

August 12, 2013

I just finished integrating Stripe with a subscription-based Django application a few weeks ago for processing credit card payments. This was the first time I've used this service and found the Stripe API and documentation to be very well written. Below are some things I learned while working on this project.

Avoid storing any credit card data in your database if you can for Payment Card Industry (PCI) compliance

One of the main reasons to …

How to convert a string to a dictionary in Python

August 9, 2011

I just found out about this today while working on a Django app. I have some data stored in a database as a string but the structure is a dictionary and I wanted to retrieve it as a dictionary object.

Instead of parsing this data to retrieve the keys and values myself, it turned out Python has a module called ast (Abstract Syntax Trees) that can take care of this, specifically the literal_eval()function:

>>> …

GWT, Django, and JSON (with padding)

August 8, 2011

A couple of months ago I was working on a project where I needed to retrieve data in JSON format from a web service written in Python (using the Django web framework) under GWT. The data is then loaded into GXT/Ext GWT grids and charts.

After looking at a GXT example of loading JSON data to a grid, I thought this would be pretty straightforward, but of course I was wrong. Since the Django …

Newer