Skip to content

Commit

Permalink
Removed the stale app — manual_class_logging, which was used during t…
Browse files Browse the repository at this point in the history
…he dashboard launch for manualy accounting teachers
  • Loading branch information
f213 committed Jan 3, 2017
1 parent a3cd27a commit 501678c
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 173 deletions.
1 change: 0 additions & 1 deletion elk/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def get_git_revision():
'history', # an app for future data mining — all significant user actions are recorded here
'mailer',
'extevents', # integrations with external calendars, like Google's one
'manual_class_logging', # temporary app to log classes completed outside the system. Should be deleted in 2016
'accounting', # teacher accounting — passed classes, customer inspired cancellation etc
'payments', # students payment processing

Expand Down
1 change: 0 additions & 1 deletion manual_class_logging/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions manual_class_logging/admin.py

This file was deleted.

9 changes: 0 additions & 9 deletions manual_class_logging/apps.py

This file was deleted.

26 changes: 0 additions & 26 deletions manual_class_logging/migrations/0001_initial.py

This file was deleted.

28 changes: 0 additions & 28 deletions manual_class_logging/migrations/0002_auto_20160822_1646.py

This file was deleted.

Empty file.
18 changes: 0 additions & 18 deletions manual_class_logging/models.py

This file was deleted.

22 changes: 0 additions & 22 deletions manual_class_logging/signals.py

This file was deleted.

9 changes: 1 addition & 8 deletions market/admin/actions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from django import forms
from django.contrib import admin
from django.shortcuts import get_object_or_404, redirect
from django.shortcuts import redirect

from elk.admin.forms import ActionFormWithParams
from elk.logging import write_admin_log_entry
from manual_class_logging.signals import class_marked_as_used, class_renewed
from teachers.models import Teacher


Expand All @@ -30,8 +29,6 @@ def mark_as_used(modeladmin, request, queryset):
if pk == -1: # when no teacher is specified
pk = request.user.teacher_data.pk

teacher = get_object_or_404(Teacher, pk=pk)

for c in queryset.all():
if not c.is_fully_used:
c.mark_as_fully_used()
Expand All @@ -40,7 +37,6 @@ def mark_as_used(modeladmin, request, queryset):
object=c,
msg='Marked as used',
)
class_marked_as_used.send(sender=mark_as_used, instance=c, teacher=teacher)


def renew(modeladmin, request, queryset):
Expand All @@ -53,8 +49,6 @@ def renew(modeladmin, request, queryset):
if pk == -1: # when no teacher is specified
pk = request.user.teacher_data.pk

teacher = get_object_or_404(Teacher, pk=pk)

for c in queryset.all():
if c.is_fully_used:
c.renew()
Expand All @@ -63,7 +57,6 @@ def renew(modeladmin, request, queryset):
object=c,
msg='Renewed',
)
class_renewed.send(sender=renew, instance=c, teacher=teacher)


def export_emails(modeladmin, request, queryset):
Expand Down
2 changes: 1 addition & 1 deletion market/migrations/0003_auto_20160929_0355.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def mark_double_scheduled_classes(apps, schema_editor):
For details of the fix, see the rest of the commit
"""
Class = apps.get_model('market.Class')
for c in Class.objects.filter(manualy_completed_classes__isnull=False, timeline__isnull=False):
for c in Class.objects.filter(timeline__isnull=False):
print("Got double-marked class for", c.customer.user.first_name, c.customer.user.last_name)
print(" → Double marked class id", c.pk)
print(" → Findind the actual class to mark as used")
Expand Down

0 comments on commit 501678c

Please sign in to comment.