kateshev14 5 hónapja
szülő
commit
5a67980377

+ 2 - 1
SharixAdmin/forms/service.py

@@ -1,5 +1,6 @@
 from django import forms
-from dbsynce.models import ServiceType, Service, Company, Comments
+from dbsynce.models import ServiceType, Service, Company
+from webservice_running.models import Comments
 from django.contrib.auth import get_user_model
 
 

+ 1 - 1
SharixAdmin/tables.py

@@ -2,8 +2,8 @@ import django_tables2 as tables
 from django.contrib.auth import get_user_model
 
 from dbsynce.models import *
+from webservice_running.models import *
 from django.utils.html import format_html
-from dbsynce.models import *
 from django.utils.translation import gettext_lazy as _
 
 class TransactionsWalletTable(tables.Table):

+ 1 - 1
SharixAdmin/views/comments.py

@@ -3,7 +3,7 @@ from django.views.generic.edit import UpdateView, CreateView, DeleteView
 from SharixAdmin.tables import CommentsTable
 from django.contrib.auth.mixins import UserPassesTestMixin
 from SharixAdmin.forms import CommentsCreateForm, ServiceTypeUpdateForm
-from dbsynce.models import Comments
+from webservice_running.models import Comments
 from django.urls import reverse
 from django.utils.translation import gettext as _
 from SharixAdmin.utils import group_required

+ 3 - 3
SharixAdmin/views/task_management.py

@@ -2,7 +2,7 @@ from django_tables2 import SingleTableView
 from django.contrib.auth.mixins import UserPassesTestMixin
 from SharixAdmin.tables import TaskTable
 from django.contrib.auth.decorators import login_required
-from dbsynce.models import Company
+from webservice_running.models import Tasks
 from django.http import JsonResponse
 from SharixAdmin.utils import group_required
 from django.utils.translation import gettext as _
@@ -10,7 +10,7 @@ from django.utils.translation import gettext as _
 
 class TaskListView(UserPassesTestMixin, SingleTableView):
     table_class = TaskTable
-    queryset = Company.objects.all()
+    queryset = Tasks.objects.all()
     template_name = 'SharixAdmin/task_management.html'
 
     def get_context_data(self, **kwargs):
@@ -35,7 +35,7 @@ def change_partners_status(request):
     if request.method == 'POST':
         partners_id = request.POST.get('partners_id')
         new_status = request.POST.get('new_status')
-        partners = Company.objects.get(pk=partners_id)
+        partners = Tasks.objects.get(pk=partners_id)
         partners.status = new_status
         partners.save()
         return JsonResponse({'status': 'success'})