Running your own Self-Hosted Etherpad Instance

Posted by Marco Louro on December 18, 2009 | code, open source | 12 comments

Etherpad is an amazing real-time collaborative editor with a very low barrier for entry (no logins, no additional software, etc.). In case you missed it, Etherpad was acquired by Google and after a community uproar decided to release their code as open source under the Apache License 2.0.

We were excited to get it up and running for our own internal use. What follows is a step-by-step guide of how we proped it up on our development servers.

Caveats:

  1. We’re not Java guys, so if there is something we could be doing better, let us know.
  2. The default setup of Etherpad is RAM hungry. Make sure you have at least 256MB free before you get started.
  3. Our instructions are Ubuntu/Debian specific, but should be easy to translate to a different distribution.

Step 1: Get the Requirements

mkdir /opt/webapps/etherpad/ && cd /opt/webapps/etherpad/
sudo aptitude install ...

Full post →

The Last 10% or: How to Keep Your Software Development On Time and Under Budget

Posted by Peter Baumgartner on November 17, 2009 | software | No comments yet.

As Lincoln Loop has evolved and grown over the last year, we’ve learned a lot not only about software development, but also about all the things that accompany it like budgeting, estimating, and scheduling. Probably the most important one is the ninety-ninety rule. It states:

The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

The lesson here is that when you think you are almost done with a project, chances are there is still a lot of work left to do. Knowing the rule is all well and good, but it doesn’t help you overcome it. The important skill is being able to adjust your thinking and planning to match the estimated amount of work to the actual amount of work. When you can do this, budgeting ...

Full post →

Django 1.0 Template Development Book Review

Posted by Peter Baumgartner on October 15, 2009 | django, review | Only one comment so far.

Packt Publishing was nice enough to send us a copy of Django 1.0 Template Development by Scott Newman for review recently. I get most of my technical information via the web, so picking up a technical book was a nice change of pace. This is a well written and enjoyable read for people looking to learn a little more about Django than what is provided in the Django tutorial.

Based on the title, I expected a thorough write-up of the template system for front-end developers. With the way Django was designed, template developers need little, if any, knowledge of Python and what goes on under the hood with Django requests. I was surprised, however, to see that pure front-end (HTML/CSS/JavaScript) developers were not the target audience of this book:

This book is for web developers and template authors who want to fully understand and utilize the Django ...

Full post →

Easy Fabric Deployment, Part 2: Multiple Committers and the Dreaded Umask

October 7, 2009 | code, django | 3 comments

In part 1, we showed how we use Fabric to update and deploy Django sites to our development server with a single command. This works great when you only have one developer pushing changes to the server, but what happens when multiple committers need to update the development server?

Linux File Permissions

Typically, the default permissions for newly created files are readable by everyone and writable by the owner (644 or -rw-r—r—). These permissions are determined by the processes umask, with the default being 022. Since we want multiple committers to be able to write to files on our development server, we need to change that to 002, creating group-writable files (664 or -rw-rw-r—).

The standard way to do this is to add the line umask 002 to /etc/profile. While that works great for interactive shells, it does not get called on non-interactive shells (the kind that ...

Full post →

Easy Fabric Deployment, Part 1: Git/Mercurial and SSH

Posted by Peter Baumgartner on September 22, 2009 | code, django | 3 comments

We’re firm believers in the practices described by the Continuous Integration method of software engineering. Among those are:

  • Maintain a code repository
  • Automate the build
  • Automate deployment

We use git for our code repositories and Fabric to automate our build/deployment process. The tiny bit of overhead it take to write out a Fabric script pays off very quickly against the tedium and error-prone practice of manually building/deploying. In building our “fabfile”, we encountered a couple of issues that took a little head-scratching to work out.

Git and SSH Keys

Git, like Mercurial and others, confirms your credentials via an private/public key pair when used over SSH. We use gitosis to manage our private repositories, so managing everyone’s keys isn’t much of an issue. The problem comes when developers need to start pulling the repository on different machines. Our developers all push to a central ...

Full post →

Using Django Inside the Tornado Web Server

Posted by Yann Malet on September 15, 2009 | code, django | 7 comments

Inspired by Eric Florenzano’s talk, Using Django in Non-Standard Ways (slides in PDF) at DjangoCon and the announcement of Tornado (tornadoweb.org), I decided to try building a small application using the Django Form library and Django ORM inside Tornado. The process proved easier than I expected, especially with Russell Keith-Magee being able to provide guidance on demand.

Step 1: Create Your Database

While Russell explained that it should be possible to get commands like syncdb running outside of a traditional Django project, it was outside the scope of this small experiment. Instead, I created a Sqlite database manually. For those of you that have forgotten how to do this, this will get you started:

# sqlite3 dev.db

sqlite> CREATE TABLE message (id integer primary key, subject varchar(30), content varchar(250));
sqlite> insert into message values(1, 'subject', 'cool stuff');
sqlite> SELECT * from message;

Step 2: Write Your ...

Full post →

Customizing the Django Admin at EuroDjangoCon 2009

Posted by Peter Baumgartner on June 22, 2009 | django, presentation | 2 comments

Last month, Lincoln Loop gave a talk at EuroDjangoCon about customizing the Django admin interface. After presenting some of the admin customizations we had done on Gondola, I had a bunch of people get in touch with me asking me to do a write-up about how it was done. After about 8 months of heel-dragging, I finally took the time to do it in presentation form.

Our talk was divided into two parts. First our User Experience Director, Michael, gave an overview of user interface design and why it is important, pulling examples from some real-world interfaces. Comparing the default Django admin to a custom built application specific interface was an intentional cheap-shot to get people to think outside-the-box when working with the admin. Our argument was that it is possible to recreate any of the example interfaces while still leveraging some of the power baked into django.contrib.admin ...

Full post →

Highlighting Named Anchors with jQuery

Posted by Peter Baumgartner on April 17, 2009 | code | 2 comments

I’ve always disliked the way named anchors (<a href=”#name”>...</a>) behave in browsers. It jumps your viewport to a different part of the page, but it’s rarely obvious which section you have landed on. If the page is long enough, the referenced section will start at the top of your browser, but where does it end? If the content is towards the bottom of the page, it may not be at the top of the page, but somewhere in the middle. And what if your content is in two columns? Or a table? What you’ve linked to becomes totally ambiguous.

Sphinx uses named anchors quite a bit, so I wanted something that would improve their usability for Django Best Practices. That’s when I dug up this clever little jQuery snippet from our code vault.

// highlight and fade background on named anchors
// requires jquery.color.js ...

Full post →

Django Best Practices

Posted by Peter Baumgartner on April 9, 2009 | django | 4 comments

This post got a bit long-winded, skip to the project announcment if you prefer.

One of the things I love about Python and Django is the philosophy that there is one obvious way to do things. Standards make it easy to dive into other people’s code and figure out what is going on pretty quickly. As with anything under active development, however, those standards are subject to change over time. What was best practice for building sites with Django 0.91 is significantly different than building sites with Django 1.0. Better tools and more experience allow us to refine our processes over time into a set of best practices. While both Python and Django are very well documented, much of the experience and wisdom that is outside the scope of the official documentation is not.

Blogs are Bad for Documentation

Most of this information lives scattered across blogs ...

Full post →

Open Source Government

Posted by Peter Baumgartner on February 19, 2009 | open source | No comments yet.

While browsing the source code of President Obama’s latest web initiative, recovery.org, I noticed something of interest.

<script type="text/javascript">
<!--//--><![CDATA[/ /><!--
jQuery.extend(Drupal.settings, { "basePath": "/" });
//--><!]]>
</script>

Wow, this can’t be true. Can it?

$ curl -I http://www.recovery.gov
HTTP/1.1 200 OK
Cache-Control: must-revalidate
Date: Thu, 19 Feb 2009 11:36:57 GMT
Content-Type: text/html; charset=utf-8
ETag: "bc708fa7497a4a151dfc2076d5f804eb"
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Wed, 18 Feb 2009 15:51:07 GMT
Server: Apache
Content-Length: 14103
X-WR-MODIFICATION: Content-Length
Connection: keep-alive

Yep, it is. These little snippets aren’t much, but they speak volumes. The White House is using open source software, specifically the Apache web server, the Drupal CMS and the jQuery javascript framework.

So What?

Open source adoption is most definitely on the rise, but it still has a stigma attached. The idea that Microsoft and ...

Full post →

Satchmo Screencast

Posted by Peter Baumgartner on December 23, 2008 | django, screencast | 6 comments

Satchmo is an amazing E-Commerce engine built on top of Django. After struggling in the past with difficult packages like ZenCart and OSCommerce, Satchmo’s ease of customization make it a joy to work with.

Unfortunately, all the features can make the administration interface a bit daunting at first glance. I created a screencast to help shop owners get started with the process of adding products and product variations in Satchmo. I’m using the latest release as of this writing (0.8.1).

Full post →

Simple & Easy Deployment with Fabric and Virtualenv

December 7, 2008 | django, gondola | 9 comments

In the process of prepping Gondola CMS for public consumption, we’ve grown from having a developer (me), to having a development team. One pain point that quickly arose was the amount of time it took for new developers to setup a local development environment. In addition to our source code, the project depends on nearly a dozen other Django apps and Python packages. Initially, we simply tracked the requirements in a text file, but it required a lot of manual work to get them downloaded and installed.

Necessity is the Mother of Invention

Of course, this problem has been tackled many, many times before1. As I looked into what was out there, my first thought was that most of the existing options were far too complex for our needs. If I didn’t grok a system after clicking around the docs for 10 minutes or so, I moved ...

Full post →

On Static Media and Django

November 13, 2008 | django | 12 comments

We all know not to serve static media (images, CSS, Javascript, etc.) in production directly from Django. Thankfully, Django gives us some nice settings like MEDIA_URL and MEDIA_ROOT to make serving them a lot less painless. Lately, however, I’ve come to realize that these settings shouldn’t really apply to all static media.

Not All Static Media Is Created Equal

Static media really comes in two flavors. Media that is part of your site like your stylesheets and user generated media or files that are uploaded to the site once it is live. We don’t want to serve all this media from the same place for a couple of reasons:

  1. Our source checkouts shouldn’t be crufted up by stuff our users are uploading
  2. User generated content and source code should live in two different places on the filesystem

We could fix the first problem with some .gitignore ...

Full post →

Serving Django Projects (Revisited)

September 22, 2008 | django | 4 comments

After reading the comments on my last post on the subject, I realized there was definitely some room for improvement in my strategy. This is take two of the original post.

Problems

My original strategy had a couple of downfalls:

  • Poisoning the Python Path
    I was adding directories to the Python Path that weren’t Python. This raised the chance of namespace collision and just wasn’t a very clean way to do things.
  • No project source repository
    I was still storing all my source files in one big folder. Tracking which project is using what was more difficult than it needed to be.

Solutions

The first step to recovery was forgetting about sharing libraries between projects altogether. In theory it sounds great, in practice it was cumbersome to manage. My directory structure now looks like this:

|-domain1.com
|--apache
|---django.wsgi
|--src
|---domain1_project_src
|---third_party_repo1
|---third_party_repo2

This is much cleaner ...

Full post →

Introduction to Gondola

September 19, 2008 | django, gondola | 4 comments

Gondola is our content management system built on top of Django. I briefly showed it off during my DjangoCon Lightning Talk, but have been wanting to give it a proper screencast for a while. Here’s an introduction:

A few common questions I don’t tackle in the screencast:

  • Is this an open source project?
    As of right now, no. I do plan on spinning off a few bits as open source over time. In fact, the WYSIWYG editor is already on Google Code as django-admin-uploads. Unfortunately it hasn’t been synced up with our in-house code in a while and isn’t working on 1.0. We’ll get that updated at some point in the near future.
  • How much will it cost?
    I haven’t settled on a pricing structure yet, but I want it to be affordable for small businesses.
  • What version of Django are you running ...

Full post →

My Lightning Talk from DjangoCon 2008

September 18, 2008 | django, presentation, trailmapping | 2 comments

DjangoCon was an amazing conference all around. I met some great people and learned a lot. I also had the opportunity to get up on stage and present some of the things I’ve been working on here. I was really nervous and after seeing how well prepared the presenters before me were, I had doubts about my plan to go on stage and wing it. I spoke about Trailmapping and Gondola the CMS I’ve been working on.

Afterwards, I was blown away by the number of compliments I received. A few people told me they thought my talk was the best of the bunch which was really encouraging. To everyone that reached out, all I can say is thanks; it meant a lot. I’m inspired to carve out some more time to blog about the things I’m working on, specifically Django admin customization and jQuery.

Well ...

Full post →

Managing Django Projects on Your Server with Style

August 28, 2008 | django | 4 comments

This article is outdated, you’ll find an updated article here.

A friend is in the process of setting up a new slice at everbody’s favorite VPS provider Slicehost and asked for some advice. I use MySQL, Nginx & Apache/mod_wsgi on Ubuntu to serve Django. I think Slicehost’s Articles are awesome and a great place to get help you get everything installed and running, so for this article, I’ll focus on some personal preferences regarding directory structure and repo management.

One of the biggest difficulties I’ve had to tackle lately is the rapid progress of Django. I have a number of client sites hosted on my slice and have had to freeze them at certain times when backwards incompatible changes come along. My original approach made this really messy, because I only accounted for having one copy of any given third party repo, symlinked from /usr ...

Full post →

Building a Community Site with Django in 40 Hours or Less

July 20, 2008 | django, trailmapping | 9 comments

All the recent hub bub about 1 week and 1 day application development, motivated me to see how quickly I could launch a website for myself. I, like many developers, struggle with building and releasing personal sites. Ask a web developer and they’re likely to tell you about a couple of sites they started and never finished. Time is always an issue, but the bigger problems are striving for perfection prior to launch and always holding out for that one “killer” feature. As time goes on, interest in the project wanes until it finally gets shelved.

The Plan

Prior to development, I set a few goals for myself:

  1. Launching quickly was priority number one. I set a goal of 3 days.
  2. Use as much existing code as possible. Even if it wasn’t a perfect fit, if it was functional, use it.
  3. Optimize later.
  4. Stop scope/feature creep at ...

Full post →

Django Newforms Admin Merged to Trunk

July 18, 2008 | django | No comments yet.

This was a huge feat. Congrats guys! 1.0 here we come.

Full post →

Django for Hire

June 26, 2008 | company news, django | 3 comments

Lincoln Loop has been in “head down” mode for the last couple months. In addition to being knee deep in client projects, we have grown from a one-man development studio to a full-fledged Django development shop/consultancy. We are proud to announce that Lincoln Loop is the first (that we know of) company focusing solely on Django application development. Our development team is currently five strong and oozing with talent. Each member contributes to the community in blog posts or open source add-ons; a few of us have contributed code to Django itself. More on our dev team in the near future.

We went through the typical growing pains during the transition, but the kinks are worked out and we can officially say that we are open for business. Django projects big and small, send them our way. Our devs can handle nearly anything.

  • New Django projects based on your ...

Full post →

Page 1 of 3
← older posts

Our Products

Premier Real Estate Websites
Our simple and easy real estate CMS. Now open for full developer access.
Trailmapping
Still in development, Trailmapping is a GPS enabled trail guide and trip logger.

Categories

Archives

Elsewhere

What we’ve been up to online

Interested in working with us?
Fill out the form below or contact us at:

PO Box 774441
Steamboat Springs, CO
80477

ph: 970.879.8810
fx:  970.367.8596
info@lincolnloop.com