Second Django Website: GoodShoppr.com¶
I’m excited to announce today my second Django-powered website: GoodShoppr.com . I’ve produced Good Shoppr to help us with our fundraising for Mission Year . The site is essentially a mashup with Amazon’s Affiliate developer program. The premise is simple: 5% of all purchases through the site are donated to charity.
Highlights¶
Last time I developed all the HTML myself. And that looked like crap. So this time I picked one of the thousands of eCommerce professional web templates on ThemeForest . For like twenty bucks I got all the HTML I could handle. What a steal! Going for a professional look and feel is well worth it when showing it to others. But there is a cost to development. Learning some of the tricks of the template were painful and troubleshooting how it worked a couple of times required help. I’m not much of an HTML/CSS/Javascript expert yet so I was glad to have friends on the IE team at Microsoft.
Once again the Python ecosystem just blows me away. People share amazing tools for free! Let me give thanks for the following:
- requests – I started down the urllib route and found I was getting bogged down in the internals. But this http library is a breeze! I guess it’s inspired but something similar in Ruby, but wow. Great api and very easy to use. Using the library to mashup with the Amazon interface is essential to the project.
- elementtree – When I get a response from Amazon it’s all in XML. Parsing nodes and attributes out of that code is pretty easy with this library. This is miles ahead of anything I’d roll myself. After parsing the XML, I create a series of models that are then consumed by the HTML templates.
- BeautifulSoup – I’ll be honest. Not everything is done through Amazon’s developer api. There are some things more easily learned from scraping HTML. I don’t do this a lot but it’s really helpful for, say, getting product identifiers from the zeitgeist pages. Some people complain this library is slow but the feature set is so rich I wouldn’t start with anything else.
- South – This was the first project I did with a second collaborator. He immediately got South up and running for us so that keeping the database in sync was manageable. I guess I like it. I wish it were built into Django. When I dabbled in Ruby, I was amazed that it kept update your tables for you. Certainly, South is good for teams.
I’m keeping the code private for now. It’s really not all that pretty and I don’t want another GoodShoppy.com popping up immediately from a fork. If you’re interested in contributing, contact me and we’ll talk.