# Path: userprofiles/contrib/accountverification/models.py
# class AccountVerification(models.Model):
#     ACTIVATED = 'ALREADY_ACTIVATED'
# 
#     user = models.ForeignKey(User, unique=True, verbose_name=_('User'))
#     activation_key = models.CharField(_('Activation key'), max_length=40)
# 
#     objects = AccountVerificationManager()
# 
#     def __unicode__(self):
#         return u'Account verification: %s' % self.user
# 
#     def activation_key_expired(self):
#         expiration_date = timedelta(days=up_settings.ACCOUNT_VERIFICATION_DAYS)
#         return (self.activation_key == self.ACTIVATED
#             or (self.user.date_joined + expiration_date <= timezone.now()))
#     activation_key_expired.boolean = True
# 
#     class Meta:
#         app_label = 'userprofiles'
#         verbose_name = _('Account verification')
#         verbose_name_plural = _('Account verifications')


from django.contrib import admin
from userprofiles.contrib.accountverification.models import AccountVerification
# -*- coding: utf-8 -*-



class AccountVerificationAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'activation_key_expired')
    search_fields = ('user__username', 'user__first_name', 'user__last_name')


# Path: userprofiles/contrib/accountverification/models.py
# class AccountVerification(models.Model):
#     ACTIVATED = 'ALREADY_ACTIVATED'
# 
#     user = models.ForeignKey(User, unique=True, verbose_name=_('User'))
#     activation_key = models.CharField(_('Activation key'), max_length=40)
# 
#     objects = AccountVerificationManager()
# 
#     def __unicode__(self):
#         return u'Account verification: %s' % self.user
# 
#     def activation_key_expired(self):
#         expiration_date = timedelta(days=up_settings.ACCOUNT_VERIFICATION_DAYS)
#         return (self.activation_key == self.ACTIVATED
#             or (self.user.date_joined + expiration_date <= timezone.now()))
#     activation_key_expired.boolean = True
# 
#     class Meta:
#         app_label = 'userprofiles'
#         verbose_name = _('Account verification')
#         verbose_name_plural = _('Account verifications')


# Path: userprofiles/contrib/accountverification/admin.py
from django.contrib import admin
from userprofiles.contrib.accountverification.models import AccountVerification

# -*- coding: utf-8 -*-



class AccountVerificationAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'activation_key_expired')
    search_fields = ('user__username', 'user__first_name', 'user__last_name')


admin.site.register(AccountVerification, AccountVerificationAdmin)