Login

Phone Model

Author:
harobed
Posted:
December 24, 2008
Language:
Python
Version:
1.0
Tags:
model phone
Score:
2 (after 2 ratings)

This is standart phone model.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class Phone(models.Model):
    TYPES_CHOICES = (
        ('HOME', u('Home')),
        ('WORK', u('Work')),
        ('MOBILE', u('Mobile')),
        ('HOME_FAX', u('Fax (home)')),
        ('WORK_FAX', u('Fax (work)')),
        ('PAGER', u('Pager')),
        ('OTHER', u('Other'))
    )
    number = models.CharField(_('Number'), maxlength = 40)
    type = models.CharField(_('Type'), maxlength=20, choices = TYPES_CHOICES)
    comment = models.TextField(_('Comment'), blank = True)

More like this

  1. "Ukrainian telephone number" model and form fields. by I159 3 years, 7 months ago
  2. BRPhoneNumberWidget by semente 3 years, 9 months ago
  3. Email and phone templatetag obfuscator by sunn 5 years, 9 months ago
  4. notify admin what fields have changed in form submission by pjv 4 years, 5 months ago
  5. A RegexpField that clean the regex match using the desired format by nasp 4 years, 8 months ago

Comments

Please login first before commenting.