瀏覽代碼

update models 1

kateshev14 5 月之前
父節點
當前提交
298f7cec9f
共有 9 個文件被更改,包括 16 次插入9 次删除
  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