The Spectacular Blog of George Titsworth

Django (Not) From Scratch

Photo courtesy of SantiMB

As I mentioned in my last post: I’m an eternal noob.

What’s sad is that I’m a Django noob with 4 years of Django experience.

Django, a web framework written in python, has been my go to web framework of choice for a few years now. Sure rails has a more vibrant community, but django has that powerful underdog vibe that I’ve always liked. My friend @trey summed it up in a nice SAT preparation example — Rails : Django :: iOS : Android.

The problem is: I’ve never finished a Django project. I always get to a decent point and just fizzle. I’m not proud of it, but it’s true. However, a few things have happened in the last few months that give me promise to tackle a few ideas I’ve been sitting on for a few years; A few examples being the barrage of easy Django hosting solutions, responsive design that will hopefully be an alternate to a dedicated mobile app for each mobile platform, and the prominence of social authentication through Facebook and Twitter.

So this is my intro to a “brand new Django project”. Not from a complete beginner’s perspective, but from the perspective of that 40 year old guy taking a class at the local community college. I’ve been around the block, but these damn kids just keep showing me up!

Since my last project, I have read the majority of the Ruby on Rails Book, which I believe does a better job of explaining the typical web development workflow than a lot of Django resources. While I understand that by doing this, the book is imposing a tremendous amount of opinion on the reader, but it gave me exactly what I needed: A day in the life of an experienced web developer. I understand the technical stuff, but what I felt like has been missing was the process that makes everything run smoothly. Not just the text book, but the professor that can fill in the gaps.

So after some time off, I’m ready to get back into some web development on an idea I’ve had for a while. And with some new tools at hand to get the job done, I’m thinking I’ll be able to knock this out fairly easily.

Epicify

My new project is called Epicify: Daily missions to unleash your epic self. I’ll save the details of the website for a future post.

For now I am going to focus on the basic architecture and infrastructure for the project. This is not meant to be a complete guide, but hopefully it will have enough information to give you the basic concepts behand what I’m doing. (Really, this is for me to remember what I was doing [Hi future me!], but you can come along for the ride if you want.)

The Basic Architecture

  • Django – obviously
  • Pinax – for the social infrastructure
  • South – for database migrations
  • Git – for source code version control
  • Gondor – for deployment

Pinax

Since I’m lazy, I am going to try to knock out all of the functionality I can without having to write a line of code. To do this, I’m going to delegate my base project infrastructure to Pinax. The best way to describe pinax is exactly how they describe it on their home page: “Pinax takes care of the things that many sites have in common so you can focus on what makes your site different.” User accounts, profiles, options for groups, private-betas, and many other pre-built site baselines.

One of my favorite parts about Pinax is that they have a default design template that has all the pages for profiles, user log-in, etc. This, along side of Django’s built in admin section, means I no longer have to worry bout these basic pages and am that much closer to working on my idea.

South

I’m still surprised there is not a built in migrations scheme in Django. For those of you who are unaware of what data migrations are, please read here. I have decided to go with South. Why… I don’t know. Why not?

Git

You have to have source control, and Git is as good as they come. I will also hook some modules into the widely popular Github.

Gondor

In the last few months, there have been a multitude of “quick” and “easy” Django deployment options. This is something the Rails world has had for a while now, and I big positive that the Django world is catching up. The goal is to make your website deployment as easy as a source code push to the host servers, and they will handle the rest.

I was lucky enough to get a beta invite to Gondor, which is a Django deployment option built by some of the bigger names in the Django community. Because of this, I am going to use this option for my deployment. We’ll see if the “quick” and “easy” holds up :).

Let’s roll up our sleeves

In the next post, I’m going to get started with the installation and configuration process. In a few short commands I hope to have a fully functional site on the web. It won’t do anything yet, but it should allow users to register for a private beta to my site, and log in assuming they have been given a beta key.

Until next time!

More stories about , , , , ,

1 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Django (Not) From Scratch