diff --git a/capstone/SEI/migrations/0002_auto_20161126_1659.py b/capstone/SEI/migrations/0002_auto_20161126_1659.py deleted file mode 100644 index cb89b1f..0000000 --- a/capstone/SEI/migrations/0002_auto_20161126_1659.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-26 21:59 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('SEI', '0001_initial'), - ] - - operations = [ - migrations.RemoveField( - model_name='project', - name='project_spending', - ), - migrations.AlterField( - model_name='project', - name='client', - field=models.CharField(blank=True, default='', max_length=200), - ), - migrations.AlterField( - model_name='project', - name='team', - field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='SEI.Team'), - ), - ] diff --git a/capstone/SEI/migrations/0002_auto_20161128_0227.py b/capstone/SEI/migrations/0002_auto_20161128_0227.py deleted file mode 100644 index 08e1cb6..0000000 --- a/capstone/SEI/migrations/0002_auto_20161128_0227.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-28 02:27 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('SEI', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='project', - options={'permissions': (('view_project', 'Can get project view'),)}, - ), - ] diff --git a/capstone/SEI/migrations/0002_auto_20161128_1610.py b/capstone/SEI/migrations/0002_auto_20161128_1610.py new file mode 100644 index 0000000..7b0d9cd --- /dev/null +++ b/capstone/SEI/migrations/0002_auto_20161128_1610.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.3 on 2016-11-28 16:10 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('SEI', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='project', + name='team', + field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='SEI.Team'), + ), + migrations.AlterField( + model_name='projectmonth', + name='employee_list', + field=models.ManyToManyField(related_name='do_project_this_month', to='SEI.Employee'), + ), + ] diff --git a/capstone/SEI/migrations/0003_auto_20161126_1700.py b/capstone/SEI/migrations/0003_auto_20161126_1700.py deleted file mode 100644 index 708d0a8..0000000 --- a/capstone/SEI/migrations/0003_auto_20161126_1700.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-26 22:00 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('SEI', '0002_auto_20161126_1659'), - ] - - operations = [ - migrations.RenameField( - model_name='project', - old_name='client', - new_name='client_name', - ), - ] diff --git a/capstone/SEI/views.py b/capstone/SEI/views.py index 04dee9f..ab3c39d 100644 --- a/capstone/SEI/views.py +++ b/capstone/SEI/views.py @@ -437,15 +437,6 @@ def get_employee_project(request,employee_id): five_month_before_date= today - datetime.timedelta(5*365/12) five_month_before = str(five_month_before_date.year) + '-' + str(five_month_before_date.month) + '-01' current_month = str(today.year) + '-' + str(today.month) + '-01' - print("pwp"+str(Project.objects.get(id=1).PWP_num)) - print("budget"+str(Project.objects.get(id=1).project_budget)) - print("description"+str(Project.objects.get(id=1).project_description)) - print("iternal"+str(Project.objects.get(id=1).is_internal)) - print("client_name"+Project.objects.get(id=1).client_name) - print("start_date"+str(Project.objects.get(id=1).start_date)) - print("end_date"+str(Project.objects.get(id=1).end_date)) - print("business_manager"+str(Project.objects.get(id=1).business_manager)) - #print(Project.objects.get(id=1).team.team_name) Tasks=EmployeeMonth.objects.filter(employee=employee,project_date__gt=five_month_before,project_date__lte=current_month) print(len(Tasks)) time_sum={} diff --git a/capstone/db.sqlite3 b/capstone/db.sqlite3 index d8e5deb..0e06e06 100644 Binary files a/capstone/db.sqlite3 and b/capstone/db.sqlite3 differ