Friday, August 29, 2008

ActiveRecord's after_save hooks in Django...

Surprising returns no relevant google results. Here's what I was looking for:

from django.db import models
  class Person(models.Model):
     first_name = models.CharField(max_length=20)
     last_name = models.CharField(max_length=20)
      def __unicode__(self):
         return u"%s %s" % (self.first_name, self.last_name)
      def save(self):
         print "Before save"
         super(Person, self).save() # Call the "real" save() method
         print "After save"
      def delete(self):
         print "Before deletion"
         super(Person, self).delete() # Call the "real" delete() method
         print "After deletion"
Source:
http://www.djangoproject.com/documentation/models/save_delete_hooks/

Saturday, August 09, 2008

Google Page Creator is on Notice

Whether Google is a godsend for small and mid-size businesses--or becoming a lumbering behemoth stopping innovation with their strangle-hold on internet eyeballs--is a topic for another post (and tell me if you'd like my take).
I've used Google Apps--the hosted tools from Google that started with "email and calendar for your business" since its beta launch. Over time they have opened more "applications" to Google App users. Recently we rolled out RightSprite.com using Google Page Creator as a stop-gap measure to get a homepage in time for the iTunes launch of our iPhone application Sudoku.MD. It's a bit hacky with a cumbersome UI, but it did the trick to get some basic content up quickly. One particular hackiness is their URL naming scheme. When you create a page you name it and then Google Page Creator comes up with the URL. Fine--so you name things carefully; however, try and copy a page and it gets named the original name plus the number '2'. Not great when optimizing URLs for Google SEO love. So I turned to google to see how to rename a Google Page Creator page.
A quick search for help turned up a tremendous amount of new-to-the-internet gems like: How do I make blinking text on my website? OK--not that bad, but just about. Basic tags, site search, are all well documented, but not what I need--change a publish URL path. If anyone tracks this down, I owe you a big favor--as I still haven't found the solution other than recreating the page as new rather than duplicating...
Along the way I did see a storm of topics covering Google's end of life for the product. People seem to be nostalgically attracted to the product--as Google's been relatively clear that they aren't abandoning the users nor data. See their post copied here:
Hello Google Page Creator Users,
We are no longer accepting new sign-ups for Page Creator because we
have shifted our focus to developing Google Sites. Google Sites offers
many of the capabilities of Page Creator along with new features like
site-level navigation, site-level headers, control over who can see
and edit your site, and rich embeddings like calendars, videos, and
Google docs. Simply put, we think that Google Sites offers a better
experience for creating web pages and websites. Consequently, we will
be shutting down Page Creator later this year.
If you are currently a Page Creator user, you can continue to use Page
Creator and your pages will automatically be transitioned to Google
Sites later this year. We are committed to making this transition as
smooth and easy as possible, and we will post more details as we get
closer to the transition time. You can also manually move your web
pages from Page Creator to Google Sites or other service providers at
any time.
Page Creator has always been a Google Labs project (Labs is our
"technology playground" where we let users test-drive experimental
products and give us feedback so we can innovate more quickly). Since
launching Page Creator in Labs, we've learned a lot and have
incorporated those lessons into Google Sites. We think the Labs
program, which allows users to try new things before they're fully
baked, lets us innovate faster and ultimately create the best possible
products.
We seriously thank each and every one of you who have taken the time
to use, write about, offer suggestions, and become passionate about
Google Page Creator.  Sites will be an exciting way to continue and
extend the great things you've been doing; we can't wait for you to
start using the service.
Sincerely,
Mike and the Google Page Creator and Sites Teams 

Saturday, August 02, 2008

Stalled System Update 10.5.4 at Configuring Installation

I booted up an older Mac this week and decided to put Leopard on it. For cleanliness sake, I wiped the disk first, then put Leopard on fresh from the DVD. All went well and the System Update ran great for all but the 10.5.4 "Combo" update.

It's a 500+MB download and when finished causes your machine to ready for a restart. Before restarting, the installer comes up and about 5% along the way, at "Configuring Installation," the machine hangs. I left it for a day. Came back, restarted. Tried again and same results.
Then came internet searches: this one and this one told me I wasn't alone but were not clear on a solution. I blitzed my /Library/Updates (sudo rm -rf /Library/Updates) and check for system updates, but had no love.
Then I tried the direct link from apple.com/downloads to the combo installer which did the trick.
I'm generally impressed with Apple's attention to detail and surprised that this is happening in the wild and not better covered. Hopefully this will be a helpful datapoint to anyone else seeing the issue.