Latest entries
How I deploy saebyn.info
Tags: django fabric git pip python virtualenv
Sun Oct 18 11:24:57 2009A few months ago I drank the koolaid and began using git on my new projects. When I started working on this new blog site I created a git server on my VPS using gitosis. I keep my entire Django project in the repository along with all of the static media and other scripts, which is a pretty standard practice.
Every time I push changes to the gitosis server, it results in calling a hook script that pulls changes from the live branch of the repository into the live website root, and pulls changes from the master branch into the testing website root. When I want to push my changes to the live website, I simply re-base the live branch to where the master branch is at and then push that branch to the server.
The server is running Apache 2 with mod_wsgi, and I'm using Apache to serve static media for now. I wouldn't necessarily suggest serving media files like this for a higher traffic site. I'm using this same server to host a few other Django projects, not all of which use the same version of Django or other Python packages. Fortunately I came across virtualenv before I started setting all of this up. In a nutshell, virtualenv lets you have a complete set of Python modules that are installed outside of your server's main Python module directory. This allows you to have multiple sets of Python modules whose versions differ.
I didn't want to have to maintain all of these Python virtual environments manually, installing each package for each project/virtualenv by hand, so I turned to pip. pip allows me to create a “requirements.txt” file which defines which packages I want to install, either from subversion or from pypi, along with a specific revision, or an exact or minimum version.
To bring this all together I used another great piece of Python software called Fabric to handle the details of my deployment process. Here's the “fabfile” I'm using for this site: fabfile.py.
New Location
Tags: django site
Sun Jul 26 16:03:10 2009In case you haven't noticed, I've moved my blog to a new URL (http://saebyn.info). I will try to post here more frequently, and while I will continue to post content about the software development work I do, I will also be posting about my other activities and about random thoughts I have.
Besides the new URL, this site is now using Django, with the diario blogging app and the threadedcomments app. One of the articles I have planned will discuss step-by-step how I set up this blog, including how I'm using git, fabric, pip, and virtualenv to handle the deployment of changes automatically.
django-classified-ads
Tags: django | Comments: 1
Sat Feb 28 18:40:39 2009Announcing the release of django-classified-ads, which is being hosted by Google Code. For everyone who has e-mailed me about this project... here it is! All of the templates and static media (CSS, images, jQuery, and TinyMCE) from django-classifieds.zxdevelopment.com has been included in the source code repository. I've replaced some of the older custom code with existing Django applications like django-profiles, django-registration, and django-paypal.
Django-Classifieds
Tags: django | Comments: 2
Thu Jan 22 12:08:54 2009Back in July, my company was contracted to work on a new classified ad site related to the golf industry. A few weeks prior to this we had decided to take the plunge and start using Django on projects whenever possible. After a few emails back-and-forth about this project, I knew that Django would make a good base for building it.
The key feature requested for the original site was to be able to support several categories of postings, each with their own distinct fields. I used a 'Field' model to represent the different field types available for each ad category. A 'FieldValue' model was used to store the value of a specific field, and associate it with the 'Field' and 'Ad' via foreign keys.
Additional features include searching, attaching images to ads, PayPal checkout, configurable pricing options, and custom templates for listing, viewing, and editing each category of ad posting.
You can see a demo version of this software here.
I can release this as an open source application, so that others can use it to build their own classified ad sites, but before I do I need to clean up the code a bit more and get more documentation in place.
Edit: Please see the follow up post.
Pledge4Code
Tags: open source pledge4code
Wed Dec 24 14:45:55 2008My company's most recent project had been incubating in my head for the last six months or so. The whole point of this project revolves around an idea for a business that I had: "Develop open source software that everybody needs, but no one wants to develop for free." The problem is that those types of projects can cost a lot of money to develop. While there are certain benefits for companies that pay for the development of open source projects and release them, companies generally recoup their investment of resources in those projects by exploiting the competitive advantage of having the software and not their competitors. Individuals generally don't have enough need for these projects to want to invest the funds required.
Pledge4Code is an attempt to give companies and individuals a new opportunity to invest in the development of open source projects by lowering the perceived cost and delivering maximum value to end users by releasing all project deliverables under OSI approved licenses. Lowering the investment a company has to make in order to get a needed project developed while that company still receives the benefits of using an open source product allows more companies to justify actively using open source software. Pledge4Code works on a "reverse bounty" system where we post prepared project specifications, and then interested businesses and individuals pledge a portion of the development cost. We begin development once all of the needed funds have been pledged. Everyone who had pledged gets to vote to decide if the project is complete, and once voted complete the source code and other deliverables get released under an OSI approved license.
Initially Pledge4Code is going to focus on development tools and libraries, and then branching out as we get a better feel for market demand. One thing we are keeping an eye out for are projects where there is no open source equivalent because it requires more than just expertise in writing good code: legal, financial, and regulatory expertise isn't cheap. Despite the fact that a lot of open source software is free, we think open source software has more value than traditional proprietary software. Pledge4Code is looking to cash in on that value and help the open source community at the same time.