Archive for the 'HowTo' Category


Django: Retrieving Backward Related Objects

0

Another one in the category of always-forget-how-to-do-this-so-noting-here:


class Entry(models.Model):
    blog = models.ForeignKey(Blog)

b = Blog.objects.get(id=1)
b.entry_set.all() # Returns all Entry objects related to Blog.

# b.entry_set is a Manager that returns QuerySets.
b.entry_set.filter(headline__contains='Lennon')
b.entry_set.count()

Full docs here.

How To Unlock The BlackBerry Pearl

0

The following worked for me for unlocking the Cingular BlackBerry Pearl I recently got:

  • Figure out your IMEI number. Press *#06# to find it.
  • Go to unlock8800 and pay for your unlock code. Mine arrived via email the next morning. I paid $20.
  • Use the instructions here to enter the unlock code. The instructions you get from the unlock8800 guys aren’t too clear; you don’t need to press each key for MEPPD and MEPP2 twice; ie. to get the letter P you push the [OP] key just once.
  • Note that when you first go the “SIM Card” page you won’t see what you type, but once you enter MEPPD correctly you’ll see a menu.