# Path: IESPV/settings.py
# EMAIL_HOST_USER = ''
# 
# Path: core/models.py
# class Observer(object):
#     
#     def update(self, input):
#         return        
# 
# class Observable(object):
#     
#     def add_observers():
#         return
# 
#     
#     def remove_observers(self, input):
#         return
# 
#     
#     def notify_observers(self, input):
#         pass        
# 
# class Email(object):
# 	
# 	def send_email(self, subject, message, email_destination):
# 		send_mail(
#                subject,
#                message,
#                EMAIL_HOST_USER,
#                [email_destination],
#                fail_silently=False,
#         )


from django.db import models
from django.contrib.auth.models import AbstractUser, User
from django.core.exceptions import ObjectDoesNotExist
from django.core.mail import send_mail
from IESPV.settings import EMAIL_HOST_USER
from datetime import datetime
from six import with_metaclass
from core.models import Observer, Observable, Email 
import hashlib

    def edit_donor(self):
        pass

    def update_donation_date(self, newDonationDate, donor):
        donor.donation_date = newDonationDate
        donor.save()

    def __str__(self):
        return self.user.username

class Administrator(Employee, Observer):

    is_superuser = True

    def register_employee(self,employee_type, name, phone_number, email, password):
        if employee_type == 'secretary':
            self.create_secretary(name, phone_number, email, password)
        else:
            self.create_administrator(name, phone_number, email, password)

    def remove_employee(self):
        pass

    def release_login(self, id_Secretary):
        try:
            secretary = Secretary.objects.get(id=id_Secretary)
        except ObjectDoesNotExist:
            secretary = None    


# Path: IESPV/settings.py
# EMAIL_HOST_USER = ''
# 
# Path: core/models.py
# class Observer(object):
#     
#     def update(self, input):
#         return        
# 
# class Observable(object):
#     
#     def add_observers():
#         return
# 
#     
#     def remove_observers(self, input):
#         return
# 
#     
#     def notify_observers(self, input):
#         pass        
# 
# class Email(object):
# 	
# 	def send_email(self, subject, message, email_destination):
# 		send_mail(
#                subject,
#                message,
#                EMAIL_HOST_USER,
#                [email_destination],
#                fail_silently=False,
#         )


# Path: users/models.py
from django.db import models
from django.contrib.auth.models import AbstractUser, User
from django.core.exceptions import ObjectDoesNotExist
from django.core.mail import send_mail
from IESPV.settings import EMAIL_HOST_USER
from datetime import datetime
from six import with_metaclass
from core.models import Observer, Observable, Email 
import hashlib


    def edit_donor(self):
        pass

    def update_donation_date(self, newDonationDate, donor):
        donor.donation_date = newDonationDate
        donor.save()

    def __str__(self):
        return self.user.username

class Administrator(Employee, Observer):

    is_superuser = True

    def register_employee(self,employee_type, name, phone_number, email, password):
        if employee_type == 'secretary':
            self.create_secretary(name, phone_number, email, password)
        else:
            self.create_administrator(name, phone_number, email, password)

    def remove_employee(self):
        pass

    def release_login(self, id_Secretary):
        try:
            secretary = Secretary.objects.get(id=id_Secretary)
        except ObjectDoesNotExist:
            secretary = None    


        if secretary is not None: