# Path: users/models.py
# class UserProfile(models.Model):
#     user = models.ForeignKey(User, unique=True)
#     agentID = models.CharField(max_length=40,
#                                default=lambda: str(uuid.uuid4()),
#                                unique=True)
#     workunit = models.CharField(max_length=2000, blank=True)
#     address = models.CharField(max_length=2000, blank=True)
#     telephone = models.CharField(max_length=100, blank=True)
# 
#     class meta:
#         verbose_name = u"用户信息"
#         verbose_name_plural = u"用户信息"
# 
#     def __unicode__(self):
#         return '%s' % (self.user)
# 
# class RegistrationProfile(models.Model):
#     """
#     A simple profile which stores an activation key for use during user account registration
#     """
#     user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
#     activation_key = models.CharField(_('activation key'), max_length=40)
# 
#     objects = RegistrationManager()
# 
#     class Meta:
#         verbose_name = u'注册信息'
#         verbose_name_plural = u'注册信息'
# 
#     def __unicode__(self):
#         return u"Registration information for %s" % self.user
# 
#     def activation_key_expired(self):
#         """
#         Determine whether this ``RegistrationProfile``'s activation
#         key has expired, returning a boolean -- ``True`` if the key
#         has expired.
#         """
#         expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
#         return self.activation_key == "ALREADY_ACTIVATED" or \
#                (self.user.date_joined + expiration_date <= get_real_now())
# 
#     activation_key_expired.boolean = True


from django.contrib import admin
from users.models import UserProfile, RegistrationProfile
#coding: utf-8


UserClass = (UserProfile,
             RegistrationProfile,
             )

for item in UserClass:

# Path: users/models.py
# class UserProfile(models.Model):
#     user = models.ForeignKey(User, unique=True)
#     agentID = models.CharField(max_length=40,
#                                default=lambda: str(uuid.uuid4()),
#                                unique=True)
#     workunit = models.CharField(max_length=2000, blank=True)
#     address = models.CharField(max_length=2000, blank=True)
#     telephone = models.CharField(max_length=100, blank=True)
# 
#     class meta:
#         verbose_name = u"用户信息"
#         verbose_name_plural = u"用户信息"
# 
#     def __unicode__(self):
#         return '%s' % (self.user)
# 
# class RegistrationProfile(models.Model):
#     """
#     A simple profile which stores an activation key for use during user account registration
#     """
#     user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
#     activation_key = models.CharField(_('activation key'), max_length=40)
# 
#     objects = RegistrationManager()
# 
#     class Meta:
#         verbose_name = u'注册信息'
#         verbose_name_plural = u'注册信息'
# 
#     def __unicode__(self):
#         return u"Registration information for %s" % self.user
# 
#     def activation_key_expired(self):
#         """
#         Determine whether this ``RegistrationProfile``'s activation
#         key has expired, returning a boolean -- ``True`` if the key
#         has expired.
#         """
#         expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
#         return self.activation_key == "ALREADY_ACTIVATED" or \
#                (self.user.date_joined + expiration_date <= get_real_now())
# 
#     activation_key_expired.boolean = True


# Path: users/admin.py
from django.contrib import admin
from users.models import UserProfile, RegistrationProfile

#coding: utf-8


UserClass = (UserProfile,
             RegistrationProfile,
             )

for item in UserClass:

    admin.site.register(item)