Archive

Posts Tagged ‘Django’

A performance lesson on Django QuerySets

December 10, 2010 10 comments

At work, we’ve contracted with PostgreSQL Experts to help us improve our Postgres performance. After analyzing our system, one of their consultants, Christophe Pettus, found glaring problems in how some of my code accessed our database.

I consider myself well-informed about good database access practices in Django, and in general. I might not exactly hit the bull’s-eye, but I’m sufficiently savvy to avoid making a “WTF” mistake, right?

Nope!
Read more…

Tags: ,

Multiple cache backends in Django

September 16, 2010 Leave a comment

Out of the box, Django’s cache framework includes different cache back-ends (including the venerable memcached) and granularities (site-wide, view-specific, etc.). How could you improve on this awesomeness?

One way is to use multiple back-ends. This might be desirable if your application needs a vanilla-flavored memcache for the site, and a second cache for a data import. Or maybe you want function results cached with different validation criteria and/or lifespans.

Using multiple cache back-ends in a Django project is easy.

Read more…

Tags:

Review: Django 1.2 e-commerce

June 20, 2010 2 comments

I already have Beginning Django E-Commerce. When Django 1.2 e-commerce came out, I thought, sure, why not. I’m a pushover for a good technical book. It has positive buzz, modulo some rumblings about glaring errors in the code samples.

Read more…

Tags: ,

Postgres site will migrate to Django

June 3, 2010 4 comments

One interesting tidbit from last night’s PostgreSQL BOF session was the news that Postgres’ site would be migrated to Django within the next year. This came from Josh Berkus.

Postgres’ site now is apparently generated from a bespoke PHP script mishmash. Josh said that tasks like creating new forms was much harder than they ought to be. So…they’re moving it to Django.

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to FurlAdd to Newsvine

Tags: ,

The Mess Django’s In?

April 30, 2010 4 comments

In the Mock It! blog, Malthe Borch writes that Django’s innards are a disaster. The comments are as good as the article. Money quote:

[If you] take a peek under the hood, your impression of Django will change dramatically:

The code is awful.

[Django's] got a terrific story if you’re willing to drink the kool-aid (basically it’s Django’s way or the high way and you shouldn’t make any friends outside the circle of trust).

Read more…

Tags:

Seattle Django Users’ group

May 15, 2009 Leave a comment

A Seattle Django Users’ group is forming. Here’s the official announcement:

—— Forwarded Message
From: Brian Gershon
Reply-To: A group of Python users in Seattle
Date: Mon, 4 May 2009 13:57:35 -0700
To: seattle-python, plone_seattle
Subject: New Seattle Django User Group meeting June 2 (Save the Date)

This is an invite for the newly forming Seattle Django User Group.

Please save the date for our first meeting: Tuesday, June 2. More details coming soon.

If you’re interested in getting regular updates, please sign up on our mailing list:

http://lists.webcollective.coop/listinfo.cgi/djangoseattle-webcollective.coop

What topics are of most interest?

Please let us know if you have a topic you’d like to present on, or a topic you’d like to hear someone else talk about.

We look forward to seeing you!

Brian and Leo

Leo Shklovskii
Brian Gershon

—— End of Forwarded Message

If you’re a Seattleite Djangonaut, sign up now!

Tags: ,

Django -> Plone: Portlets, Viewlets, Zcatalog, Aspects

October 4, 2008 9 comments

[Another in a series of posts about moving from Django to Plone. I'm a Plone/Zope newbie writing about my bafflements and enlightenments as they happen.

Some of my opinions are certainly wrong. I'm writing this in the expectation that the history of my meandering learning path may be useful, or at least entertaining, to future Plone newbies. If I sound wordy today, it may be because I just watched Good Night, and Good Luck. on my Blu-ray player. (The difference between Edward R. Murrow, and the regurgitating talking heads of today's television, is a sad thing to contemplate.)]

I spent only half of this week on Plone/Zope. Here’s some of what I bumped into.

Portlets, Viewlets, and Content Managers

I’ve been puzzled about the big conceptual difference between portlets and viewlets. Not until I read page 234 of Professional Plone Development did I understand that it was in their invocation model! A viewlet will generate page content anywhere in the page when a viewlet manager deliberately invokes it. A portlet may generate content in the left or right column, automatically.

Read more…

Tags: , ,

Django -> Plone: Light Bulbs, differences, irks

September 13, 2008 14 comments

[This continues from my first post about my Django-to-Plone odyssey.]

I now understand more of Plone‘s underlying concepts. I can’t yet create a non-trivial Plone site from scratch in a reasonable amount of time, but I’m getting closer. I’ve read some of, and have temporarily put aside, Professional Plone Development. I’ve read a few of the on-line tutorials and quite a bit of the documentation, and I’m now reading The Zope Book, which has been the high point of the past week.

For your erudition or amusement, here are more notes from my shift from Django to Plone/Zope.

Light Bulbs

These little epiphanies enabled parts of the Plone/Zope universe to click into place. I hope writing about them will help someone else… Read more…

Tags: , ,

Moving from Django to Plone

September 6, 2008 7 comments

This is the first of what might be a series of posts about learning Plone.

I’ve worked in Django since January 2006, when Joe HeckKaren Williams, and I built the now-defunct TrenchMice site. I haven’t done any Django work since March, when I joined Fisher Communications, but I’ve followed the mailing lists and blogs. And I bought and read the recently published Django books, just for grins.

At work, I’ve been getting ready to launch a Django-based CMS project. It was going to use Ella, PyLucid, Ellington, or maybe be built from scratch. But at the end of July, unexpected requirements changes made me shift it from Django to a Plone base. (I won’t go into the reasons why now; that’s an interesting post for a later time.) So without any warning, this Djangonaut needed to become a Plonista.

I thought that writing about my process of learning Plone might be useful to future Plone neophytes. Or at least entertaining. Read more…

Tags: , ,

How to dive into another team’s Django code

May 25, 2008 4 comments

I’m starting to learn my way around another team’s Django project.

They started from yet another team’s code base, and extensively modified it over the last ~1.5 years. It’s code for a large commercial site, which I hope to use to build an even larger commercial site having needs similar to, but different from, theirs.

My immediate goals are to figure out what code changes the new site will require, and some project logistics.  Source pool management will be the trickiest of these — do we share, partially share, use separate pools with periodic merges, or cleave off and stay forever separate?

I tend to approach design holistically.  But sometimes, like now, I have to force myself to use a different approach in order to get the best results. Here’s my approach for jumping head first into another team’s pool.

Read more…

Tags:

TrenchMice gets snuffed

April 30, 2008 16 comments

We pulled the plug on TrenchMice yesterday.  It had plateaued in traffic, and wasn’t able to break through to the next level of readership. New features or different marketing efforts resulted in only temporary traffic spikes, followed by a return to the plateau.

The cost for the servers wouldn’t be a large financial drain in and of themselves, but keeping it alive would distract me from new ventures and work.  (Even for an automated site, you’ve got to periodically check the server logs, analyze crashes, fix bugs, update the software, yaddayaddayadda.)  So…it’s gone. Read more…

Tags: , ,
Follow

Get every new post delivered to your Inbox.

Join 850 other followers