Beispiel #1
0
    def __init__(self, **kwargs):
        if 'name' not in kwargs:
            current_app.logger.debug("mandatory attribute `name` is missing")
            raise AttributeRequired("mandatory attribute `name` is missing")
        self.set_name(kwargs['name'])

        if 'email' not in kwargs:
            current_app.logger.debug("mandatory attribute `email` is missing")
            raise AttributeRequired("mandatory attribute `email` is missing")
        self.set_email(kwargs['email'])

        if 'role' not in kwargs:
            current_app.logger.debug("mandatory attribute `role` is missing")
            raise AttributeRequired("mandatory attribute `role` is missing")
        self.set_role(kwargs['role'])

        if 'last_active' in kwargs:
            current_app.logger.debug(
                "mandatory attribute `last_active` is missing")
            self.set_last_active(kwargs['last_active'])

        if 'created' in kwargs:
            self.set_toc(kwargs['created'])

        if 'institute_name' in kwargs:
            self.set_institute_name(kwargs['institute_name'])
Beispiel #2
0
    def __init__(self, **kwargs):

        if 'user' not in kwargs:
            raise AttributeRequired("mandatory attribute `user` is missing")
        self.set_user(kwargs['user'])

        if 'last_updated' in kwargs:
            self.set_last_updated(kwargs['last_updated'])

        if 'created_by' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `created_by` is missing")
        self.set_created_by(kwargs['created_by'])

        if 'nodal_centre' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `nodal_centre` is missing")
        self.set_nodal_centre(kwargs['nodal_centre'])

        if 'target_workshops' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `target_workshops` is missing")
        self.set_target_workshops(kwargs['target_workshops'])

        if 'target_participants' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `target_participants` is missing")
        self.set_target_participants(kwargs['target_participants'])

        if 'target_experiments' in kwargs:
            self.set_target_experiments(kwargs['target_experiments'])
Beispiel #3
0
    def __init__(self, **kwargs):
        if 'name' not in kwargs:
            raise AttributeRequired("mandatory attribute `name` is missing")
        self.set_name(kwargs['name'])

        if 'user' not in kwargs:
            raise AttributeRequired("mandatory attribute `user` is missing")
        self.set_user(kwargs['user'])

        if 'path' in kwargs:
            self.set_path(kwargs['path'])
Beispiel #4
0
    def __init__(self, **kwargs):

        if 'workshop' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `workshop` is missing")
        self.set_workshop(kwargs['workshop'])

        if 'path' in kwargs:
            self.set_path(kwargs['path'])

        if 'name' not in kwargs:
            raise AttributeRequired("mandatory attribute `name` is missing")
        self.set_name(kwargs['name'])
Beispiel #5
0
    def __init__(self, **kwargs):
        if 'name' not in kwargs:
            raise AttributeRequired("mandatory attribute `name` is missing")
        self.set_name(kwargs['name'])

        if 'location' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `location` is missing")
        self.set_location(kwargs['location'])

        if 'created_by' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `created_by` is missing")
        self.set_created_by(kwargs['created_by'])

        if 'longitude' in kwargs:
            self.set_longitude(kwargs['longitude'])

        if 'lattitude' in kwargs:
            self.set_lattitude(kwargs['lattitude'])

        if 'pincode' in kwargs:
            self.set_pincode(kwargs['pincode'])
Beispiel #6
0
    def __init__(self, **kwargs):
        if not 'name' in kwargs:
            raise AttributeRequired("Not of the type Role")
        self.set_name(kwargs['name'])

        Role.roles.append(kwargs['name'])
Beispiel #7
0
 def __init__(self, **kwargs):
     if 'name' not in kwargs:
         current_app.logger.debug("mandatory attribute `name` is missing")
         raise AttributeRequired("mandatory attribute `name` is missing")
     self.set_name(kwargs['name'])
Beispiel #8
0
    def __init__(self, **kwargs):
        if 'name' not in kwargs:
            raise AttributeRequired("mandatory attribute `name` is missing")
        self.set_name(kwargs['name'])

        if 'location' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `location` is missing")
        self.set_location(kwargs['location'])

        if 'user' not in kwargs:
            raise AttributeRequired("mandatory attribute `user` is missing")
        self.set_user(kwargs['user'])

        if 'participating_institutes' not in kwargs:
            raise AttributeRequired(
                "mandatory attribute `participating_institutes` is missing")
        self.set_participating_institutes(kwargs['participating_institutes'])

        if 'no_of_participants_expected' not in kwargs:
            raise AttributeRequired("mandatory attribute `no_of_participants_\
            expected` is missing")
        self.set_no_of_participants_expected(
            kwargs['no_of_participants_expected'])

        if 'no_of_sessions' not in kwargs:
            raise AttributeRequired("mandatory attribute `no_of_sessions` is\
            missing")
        self.set_no_of_sessions(kwargs['no_of_sessions'])

        if 'labs_planned' not in kwargs:
            raise AttributeRequired("mandatory attribute `labs_planned` is\
            missing")
        self.set_labs_planned(kwargs['labs_planned'])

        if 'status' not in kwargs:
            raise AttributeRequired("mandatory attribute `status` is missing")
        self.set_status(kwargs['status'])

        if 'date' not in kwargs:
            raise AttributeRequired("mandatory attribute `date` is missing")
        self.set_date(kwargs['date'])

        if 'version' not in kwargs:
            raise AttributeRequired("mandatory attribute `version` is\
            missing")
        self.set_version(kwargs['version'])

        if 'participants_attended' in kwargs:
            self.set_participants_attended(kwargs['participants_attended'])

        if 'duration_of_sessions' in kwargs:
            self.set_duration_of_sessions(kwargs['duration_of_sessions'])

        if 'experiments_conducted' in kwargs:
            self.set_experiments_conducted(kwargs['experiments_conducted'])

        if 'disciplines' in kwargs:
            self.set_disciplines(kwargs['disciplines'])

        if 'other_details' in kwargs:
            self.set_other_details(kwargs['other_details'])

        if 'cancellation_reason' in kwargs:
            self.set_cancellation_reason(kwargs['cancellation_reason'])

        if 'not_approval_reason' in kwargs:
            self.set_not_approval_reason(kwargs['not_approval_reason'])

        if 'gateway_ip' in kwargs:
            self.set_gateway_ip(kwargs['gateway_ip'])

        if 'last_updated' in kwargs:
            self.set_last_updated(kwargs['last_updated'])
Beispiel #9
0
 def __init__(self, **kwargs):
     if 'name' not in kwargs:
         raise AttributeRequired("mandatory attribute `name` is missing")
     self.set_name(kwargs['name'])