I wanted to get last six months of employee count by checking joining_date field
class Employee(models.Model):
employee_name = models.CharField(max_length=100)
joining_Date = models.DateField(blank=False, null=False)
Example:
July : 12,
June : 10,
May : 8,
April : 16,
March : 13,
February : 10,
I got an answer for that from 0svoid, check here Its really working great! but problem is when there is no entry in particular month I want it to be 0 instead of not coming in the list.
Say for example june month not having any employee joining.
it should show like
July : 12,
June : 0,
May : 8,
April : 16,
March : 13,
February : 10,
instead of below one.
July : 12,
May : 8,
April : 16,
March : 13,
February : 10,
I want to work on many scenario(s) something like above , please suggest me any module or a way to generate reports to show in the template from the database(s)..