models/marking_model.py
def count_completed(cls, name, date, year):
        """Function which counts how many entries have been completed"""
        count = 0
        obj = cls.query.filter_by(employee=name).filter(MarkingModel.complete != '').all()
        for o in obj:
            if o.complete.split('-')[1] == date and o.complete.split('-')[0] == year:
                count += 1
        return count
Function which counts how many entries have been completed
Function which counts how many entries have been completed
Function which counts how many entries have been completed
def count_completed(cls, name, date, year):
        count = 0
        obj = cls.query.filter_by(employee=name).filter(MarkingModel.complete != '').all()
        for o in obj:
            if o.complete.split('-')[1] == date and o.complete.split('-')[0] == year:
                count += 1
        return count
def count_completed ( cls , name , date , year ) : count = 0 obj = cls . query . filter_by ( employee = name ) . filter ( MarkingModel . complete != '' ) . all ( ) for o in obj : if o . complete . split ( '-' ) [ 1 ] == date and o . complete . split ( '-' ) [ 0 ] == year : count += 1 return count
Function which counts how many entries have been completed
Function which counts how many entries have been completed
"""Function which counts how many entries have been completed"""
cls
name
date
year