Browse Source

update models 1

kateshev14 5 tháng trước cách đây
mục cha
commit
298f7cec9f
9 tập tin đã thay đổi với 16 bổ sung9 xóa
  1. 3 1
      apiviews/__init__.py
  2. 1 1
      apiviews/comments.py
  3. 1 1
      apiviews/tasks.py
  4. 1 0
      forms.py
  5. 3 1
      models/__init__.py
  6. 1 1
      models/tasks.py
  7. 3 1
      serializer/__init__.py
  8. 2 2
      tables.py
  9. 1 1
      urls.py

+ 3 - 1
apiviews/__init__.py

@@ -1 +1,3 @@
-from .orders_local import *
+from .orders_local import *
+from .comments import *
+from .tasks import *

+ 1 - 1
apiviews/comments.py

@@ -1,4 +1,4 @@
-from dbsynce.serializer import CommentsSerializer
+from webservice_running.serializer import CommentsSerializer
 from rest_framework import viewsets, permissions
 from webservice_running.models import Comments
 

+ 1 - 1
apiviews/tasks.py

@@ -1,4 +1,4 @@
-from dbsynce.serializer import TasksSerializer
+from webservice_running.serializer import TasksSerializer
 from rest_framework import viewsets, permissions
 from webservice_running.models import Tasks
 

+ 1 - 0
forms.py

@@ -3,6 +3,7 @@ from django.contrib.auth import get_user_model
 
 from webservice_running.models import OrdersLocal 
 from django.contrib.auth.forms import UserCreationForm
+import datetime
 
 GUIDE_TYPE = [
     ('one', '1'),

+ 3 - 1
models/__init__.py

@@ -1 +1,3 @@
-from .orders_local import *
+from .orders_local import *
+from .comments import *
+from .tasks import *

+ 1 - 1
models/tasks.py

@@ -8,7 +8,7 @@ class Tasks(models.Model):
     """
     Задачи
     """
-    repr_id = models.ForeignKey(get_user_model(), blank=True, on_delete=models.DO_NOTHING, help_text="Уникальный идентификатор ответственного за задачу")
+    repr_id = models.ForeignKey(get_user_model(), related_name="repr_id", blank=True, on_delete=models.DO_NOTHING, help_text="Уникальный идентификатор ответственного за задачу")
     user_id = models.ForeignKey(get_user_model(), on_delete=models.DO_NOTHING, null=True, help_text="уникальный идентификатор пользователя/клиента/аккаунта, который должен выполнить задачу")
     task_description = models.TextField(blank=True, help_text="текстовое описание услуги")
     status = models.CharField(max_length=150, help_text="активность на основе системы заявок", default="deactivated")

+ 3 - 1
serializer/__init__.py

@@ -1 +1,3 @@
-from .orders_local import *
+from .orders_local import *
+from .comments import *
+from .tasks import *

+ 2 - 2
tables.py

@@ -1,6 +1,6 @@
 import django_tables2 as tables
-from models import *
-from models import OrdersLocal 
+from webservice_running.models import *
+from webservice_running.models import OrdersLocal 
 
 class OrderList(tables.Table):
 

+ 1 - 1
urls.py

@@ -1,4 +1,4 @@
-from apiviews import *
+from webservice_running.apiviews import *
 from rest_framework import routers
 from django.urls import path, include, re_path
 from django.contrib.auth.decorators import login_required