jdriscoll / django-addressbook

Contact management application for the Django web development framework.

Django Addressbook

Addressbook is a flexible contact management application for Django. It uses the concept of "primary properties" to create an API that masks some of the complexity of storing multiple phone numbers, addresses, etc. for each contact. Requires django-imagekit for image processing.

Brief Introduction

>>> from addressbook.models import *

# Create a new contact
>>> c = Contact(name="Justin Driscoll")

# Add a new email address to this contact
>>> c.email_address = EmailAddress(label='home', value='address@example.com')

# This email becomes the contacts "primary" email address
>>> c.email_address
<EmailAddress: address@example.com [home]>

# Let add another email address the same way
>>> c.email_address = EmailAddress(label='work', value='anotheraddress@example.com')

# This email is now the contacts "primary" email address
>>> c.email_address
<EmailAddress: anotheraddress@example.com [work]>

# Did we overwrite the old address? No.
>>> c.email_addresses.all()
[<EmailAddress: address@example.com [home]>, <EmailAddress: anotheraddress@example.com [work]>]

Contact Properties That Can Be Primary

  • EmailAddress
  • Organization (as company)
  • PhoneNumber
  • PostalAddress

Other Contact Properties

  • CustomField
  • Date
  • IMAccount
  • Link

More To Come