user пре 4 година
родитељ
комит
785e9ecaff
46 измењених фајлова са 290 додато и 183 уклоњено
  1. 1 0
      Pipfile
  2. 9 1
      Pipfile.lock
  3. BIN
      detailmptt/__pycache__/__init__.cpython-37.pyc
  4. BIN
      detailmptt/__pycache__/admin.cpython-37.pyc
  5. BIN
      detailmptt/__pycache__/models.cpython-37.pyc
  6. 1 1
      detailmptt/migrations/0001_initial.py
  7. BIN
      detailmptt/migrations/__pycache__/0001_initial.cpython-37.pyc
  8. 0 14
      detailmptt/models.py
  9. BIN
      pivottable/__pycache__/__init__.cpython-37.pyc
  10. BIN
      pivottable/__pycache__/admin.cpython-37.pyc
  11. BIN
      pivottable/__pycache__/models.cpython-37.pyc
  12. 0 37
      pivottable/migrations/0001_initial.py
  13. 0 16
      pivottable/migrations/0002_delete_menu.py
  14. 0 38
      pivottable/migrations/0003_menu.py
  15. 0 16
      pivottable/migrations/0004_delete_menu.py
  16. BIN
      pivottable/migrations/__pycache__/0001_initial.cpython-37.pyc
  17. BIN
      pivottable/migrations/__pycache__/0002_delete_menu.cpython-37.pyc
  18. BIN
      pivottable/migrations/__pycache__/0003_menu.cpython-37.pyc
  19. BIN
      pivottable/migrations/__pycache__/0004_delete_menu.cpython-37.pyc
  20. 0 0
      power/__init__.py
  21. BIN
      power/__pycache__/__init__.cpython-37.pyc
  22. BIN
      power/__pycache__/admin.cpython-37.pyc
  23. BIN
      power/__pycache__/models.cpython-37.pyc
  24. 3 0
      power/admin.py
  25. 5 0
      power/apps.py
  26. 45 0
      power/migrations/0001_initial.py
  27. 23 0
      power/migrations/0002_auto_20200803_1719.py
  28. 25 0
      power/migrations/0003_auto_20200806_1724.py
  29. 0 0
      power/migrations/__init__.py
  30. 23 0
      power/models.py
  31. 18 0
      power/serializer.py
  32. 3 0
      power/tests.py
  33. 29 0
      power/urls.py
  34. 57 0
      power/views.py
  35. BIN
      relation/__pycache__/__init__.cpython-37.pyc
  36. BIN
      relation/__pycache__/admin.cpython-37.pyc
  37. BIN
      relation/__pycache__/models.cpython-37.pyc
  38. 43 8
      relation/migrations/0001_initial.py
  39. 0 49
      relation/migrations/0002_daptpost_daptuser_postuser.py
  40. BIN
      relation/migrations/__pycache__/0001_initial.cpython-37.pyc
  41. BIN
      relation/migrations/__pycache__/0002_daptpost_daptuser_postuser.cpython-37.pyc
  42. BIN
      testthree/__pycache__/settings.cpython-37.pyc
  43. 2 1
      testthree/settings.py
  44. 2 1
      testthree/urls.py
  45. 1 1
      workreport/migrations/0001_initial.py
  46. BIN
      workreport/migrations/__pycache__/0001_initial.cpython-37.pyc

+ 1 - 0
Pipfile

@@ -10,6 +10,7 @@ djangorestframework = "*"
 mysqlclient = "*"
 djangorestframework-bulk = "*"
 django-filter = "*"
+django-mysql = "*"
 
 [requires]
 python_version = "3.7"

+ 9 - 1
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "c775d44ee2191d8fc65e8105b1a7afca200d75a5af7ce971f8795749e825283d"
+            "sha256": "66d4f29eaaa3db768109b847456c95d893c05f6fb62a9551a4ce8740acad3e1f"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -40,6 +40,14 @@
             "index": "pypi",
             "version": "==2.3.0"
         },
+        "django-mysql": {
+            "hashes": [
+                "sha256:473e3b01acbc14a85b65e8a8d628ab6957dff0409cf782dde4830726b3731df3",
+                "sha256:c47065b347a59ef1e1e4b7330f32a17ac37b5fc286f31409551ee9581047f22b"
+            ],
+            "index": "pypi",
+            "version": "==3.8.1"
+        },
         "djangorestframework": {
             "hashes": [
                 "sha256:05809fc66e1c997fd9a32ea5730d9f4ba28b109b9da71fccfa5ff241201fd0a4",

BIN
detailmptt/__pycache__/__init__.cpython-37.pyc


BIN
detailmptt/__pycache__/admin.cpython-37.pyc


BIN
detailmptt/__pycache__/models.cpython-37.pyc


+ 1 - 1
detailmptt/migrations/0001_initial.py

@@ -1,4 +1,4 @@
-# Generated by Django 3.0.8 on 2020-07-24 07:47
+# Generated by Django 3.0.8 on 2020-08-03 07:49
 
 from django.conf import settings
 from django.db import migrations, models

BIN
detailmptt/migrations/__pycache__/0001_initial.cpython-37.pyc


+ 0 - 14
detailmptt/models.py

@@ -27,18 +27,4 @@ class DailyMptt(MPTTModel):
         order_insertion_by = ['title']#自然顺序
 
 
-# 权限表
-class Role(models.Model):
-    title = models.CharField(max_length=32)
-    permissions = models.ManyToManyField('Permission')
 
-    def __str__(self):
-        return self.title
-
-#菜单表
-class menu(models.Model):
-    title = models.CharField(max_length=32)
-    url = models.CharField(max_length=32)
-
-    def __str__(self):
-        return self.title

BIN
pivottable/__pycache__/__init__.cpython-37.pyc


BIN
pivottable/__pycache__/admin.cpython-37.pyc


BIN
pivottable/__pycache__/models.cpython-37.pyc


+ 0 - 37
pivottable/migrations/0001_initial.py

@@ -1,37 +0,0 @@
-# Generated by Django 3.0.8 on 2020-07-28 11:40
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-import mptt.fields
-
-
-class Migration(migrations.Migration):
-
-    initial = True
-
-    dependencies = [
-        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='Menu',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('name', models.CharField(max_length=100)),
-                ('config', models.TextField()),
-                ('create_at', models.DateTimeField(auto_now_add=True)),
-                ('code', models.CharField(max_length=100)),
-                ('lft', models.PositiveIntegerField(editable=False)),
-                ('rght', models.PositiveIntegerField(editable=False)),
-                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
-                ('level', models.PositiveIntegerField(editable=False)),
-                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
-                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pivottable.Menu')),
-            ],
-            options={
-                'abstract': False,
-            },
-        ),
-    ]

+ 0 - 16
pivottable/migrations/0002_delete_menu.py

@@ -1,16 +0,0 @@
-# Generated by Django 3.0.8 on 2020-07-28 11:49
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('pivottable', '0001_initial'),
-    ]
-
-    operations = [
-        migrations.DeleteModel(
-            name='Menu',
-        ),
-    ]

+ 0 - 38
pivottable/migrations/0003_menu.py

@@ -1,38 +0,0 @@
-# Generated by Django 3.0.8 on 2020-07-28 11:55
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-import mptt.fields
-
-
-class Migration(migrations.Migration):
-
-    initial = True
-
-    dependencies = [
-        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
-        ('pivottable', '0002_delete_menu'),
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='Menu',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('name', models.CharField(max_length=100)),
-                ('config', models.TextField()),
-                ('create_at', models.DateTimeField(auto_now_add=True)),
-                ('code', models.CharField(max_length=100)),
-                ('lft', models.PositiveIntegerField(editable=False)),
-                ('rght', models.PositiveIntegerField(editable=False)),
-                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
-                ('level', models.PositiveIntegerField(editable=False)),
-                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
-                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pivottable.Menu')),
-            ],
-            options={
-                'abstract': False,
-            },
-        ),
-    ]

+ 0 - 16
pivottable/migrations/0004_delete_menu.py

@@ -1,16 +0,0 @@
-# Generated by Django 3.0.8 on 2020-07-28 11:57
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('pivottable', '0003_menu'),
-    ]
-
-    operations = [
-        migrations.DeleteModel(
-            name='Menu',
-        ),
-    ]

BIN
pivottable/migrations/__pycache__/0001_initial.cpython-37.pyc


BIN
pivottable/migrations/__pycache__/0002_delete_menu.cpython-37.pyc


BIN
pivottable/migrations/__pycache__/0003_menu.cpython-37.pyc


BIN
pivottable/migrations/__pycache__/0004_delete_menu.cpython-37.pyc


+ 0 - 0
power/__init__.py


BIN
power/__pycache__/__init__.cpython-37.pyc


BIN
power/__pycache__/admin.cpython-37.pyc


BIN
power/__pycache__/models.cpython-37.pyc


+ 3 - 0
power/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
power/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class PowerConfig(AppConfig):
+    name = 'power'

+ 45 - 0
power/migrations/0001_initial.py

@@ -0,0 +1,45 @@
+# Generated by Django 3.0.8 on 2020-08-03 07:49
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Route',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('name', models.CharField(max_length=80, verbose_name='name')),
+                ('title', models.CharField(max_length=80, verbose_name='title')),
+                ('url', models.CharField(max_length=80, verbose_name='name')),
+                ('lft', models.PositiveIntegerField(editable=False)),
+                ('rght', models.PositiveIntegerField(editable=False)),
+                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
+                ('level', models.PositiveIntegerField(editable=False)),
+                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pid', to='power.Route', verbose_name='上级')),
+            ],
+            options={
+                'abstract': False,
+            },
+        ),
+        migrations.CreateModel(
+            name='UserRoute',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('route', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_user', to='power.Route', verbose_name='路由')),
+                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_user', to=settings.AUTH_USER_MODEL, verbose_name='用户')),
+            ],
+            options={
+                'unique_together': {('user', 'route')},
+            },
+        ),
+    ]

+ 23 - 0
power/migrations/0002_auto_20200803_1719.py

@@ -0,0 +1,23 @@
+# Generated by Django 3.0.8 on 2020-08-03 09:19
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('power', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='route',
+            name='title',
+        ),
+        migrations.AlterField(
+            model_name='userroute',
+            name='route',
+            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_route', to='power.Route', verbose_name='路由'),
+        ),
+    ]

+ 25 - 0
power/migrations/0003_auto_20200806_1724.py

@@ -0,0 +1,25 @@
+# Generated by Django 3.0.8 on 2020-08-06 09:24
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('power', '0002_auto_20200803_1719'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='route',
+            name='path',
+            field=models.CharField(default='django', max_length=80, verbose_name='name'),
+            preserve_default=False,
+        ),
+        migrations.AlterField(
+            model_name='userroute',
+            name='route',
+            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_route', to='power.Route', verbose_name='菜单'),
+        ),
+    ]

+ 0 - 0
power/migrations/__init__.py


+ 23 - 0
power/models.py

@@ -0,0 +1,23 @@
+from django.contrib.auth.models import User
+from django.db import models
+
+
+#路由表
+
+from mptt.models import MPTTModel
+
+
+#路由表
+class Route(MPTTModel):
+    name = models.CharField('name', max_length=80)
+    path = models.CharField('name', max_length=80)
+    url = models.CharField('name', max_length=80)
+    parent = models.ForeignKey('self', verbose_name='上级', null=True, blank=True, related_name='pid', on_delete = models.CASCADE)
+
+class UserRoute(models.Model):
+    route = models.ForeignKey('Route', verbose_name='菜单', null=False, blank=False, related_name='ur_route',
+                             on_delete=models.CASCADE)
+    user = models.ForeignKey(User, verbose_name='用户', null=False, blank=False, related_name='ur_user',
+                             on_delete=models.CASCADE)
+    class Meta:
+        unique_together = ('user', 'route')

+ 18 - 0
power/serializer.py

@@ -0,0 +1,18 @@
+from rest_framework import serializers
+from rest_framework.serializers import ListSerializer
+
+from power.models import Route, UserRoute
+
+
+class RouteSerializer(serializers.ModelSerializer):
+    class Meta:
+        model = Route
+        list_serializer = ListSerializer
+        fields = '__all__'
+
+class UserRouteSerializer(serializers.ModelSerializer):
+    class Meta:
+        model = UserRoute
+        list_serializer = ListSerializer
+        fields = '__all__'
+

+ 3 - 0
power/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 29 - 0
power/urls.py

@@ -0,0 +1,29 @@
+"""testthree URL Configuration
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+    https://docs.djangoproject.com/en/3.0/topics/http/urls/
+Examples:
+Function views
+    1. Add an import:  from my_app import views
+    2. Add a URL to urlpatterns:  path('', views.home, name='home')
+Class-based views
+    1. Add an import:  from other_app.views import Home
+    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
+Including another URLconf
+    1. Import the include() function: from django.urls import include, path
+    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
+"""
+from django.conf.urls import url
+from rest_framework_bulk.routes import BulkRouter
+
+from power.views import *
+
+# 给智能路由注册
+router = BulkRouter()
+router.register(r'userroute', UserRouteViews)
+router.register(r'route',RouteViews)
+
+urlpatterns = router.urls
+urlpatterns += [
+
+]

+ 57 - 0
power/views.py

@@ -0,0 +1,57 @@
+from django.contrib.auth.models import *
+from django.shortcuts import render
+
+# Create your views here.
+from rest_framework import status, permissions
+from rest_framework.response import Response
+
+
+# class RolePermissionViews(APIView):
+#     def get(self, request):
+from rest_framework.viewsets import ModelViewSet
+
+from power.models import *
+from power.serializer import RouteSerializer, UserRouteSerializer
+
+
+class UserRouteViews(ModelViewSet):
+    pagination_class = None
+    queryset = UserRoute.objects.all()
+    serializer_class = UserRouteSerializer
+
+    def list(self, request):
+        user = request.user
+        userId = user.id
+        userRouteList = UserRoute.objects.filter(user_id = user.id)
+        routeList = list()
+        parentRoute = list()
+        queryRoute = list()
+        routeIdArray = []
+        for userRoute in userRouteList:
+            route = userRoute.route
+            parentRoute.append(userRoute.route)
+            routeIdArray.append(route.id)
+
+        while len(parentRoute) > 0:
+            queryRoute = parentRoute
+            parentRoute = list()
+
+            for route in queryRoute:
+                routeList.append(route)
+                parent = route.parent
+                if parent != None and parent.id not in routeIdArray:
+                    parentRoute.append(parent)
+                    routeIdArray.append(parent.id)
+        data = RouteSerializer(routeList, many=True)
+
+        return Response(data=data.data, status=status.HTTP_200_OK)
+
+class RouteViews(ModelViewSet):
+    pagination_class = None
+    queryset = Route.objects.all()
+    serializer_class = RouteSerializer
+    
+
+
+
+

BIN
relation/__pycache__/__init__.cpython-37.pyc


BIN
relation/__pycache__/admin.cpython-37.pyc


BIN
relation/__pycache__/models.cpython-37.pyc


+ 43 - 8
relation/migrations/0001_initial.py

@@ -1,5 +1,6 @@
-# Generated by Django 3.0.8 on 2020-07-24 07:47
+# Generated by Django 3.0.8 on 2020-08-03 07:49
 
+from django.conf import settings
 from django.db import migrations, models
 import django.db.models.deletion
 
@@ -9,16 +10,10 @@ class Migration(migrations.Migration):
     initial = True
 
     dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
     ]
 
     operations = [
-        migrations.CreateModel(
-            name='Post',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('name', models.CharField(max_length=50)),
-            ],
-        ),
         migrations.CreateModel(
             name='Dapt',
             fields=[
@@ -34,4 +29,44 @@ class Migration(migrations.Migration):
                 'abstract': False,
             },
         ),
+        migrations.CreateModel(
+            name='Post',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('name', models.CharField(max_length=50)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='PostUser',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_post', to='relation.Post', verbose_name='岗位')),
+                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
+            ],
+            options={
+                'unique_together': {('post', 'user')},
+            },
+        ),
+        migrations.CreateModel(
+            name='DaptUser',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_dapt', to='relation.Dapt', verbose_name='部门')),
+                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
+            ],
+            options={
+                'unique_together': {('dapt', 'user')},
+            },
+        ),
+        migrations.CreateModel(
+            name='DaptPost',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_dapt', to='relation.Dapt', verbose_name='部门')),
+                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_post', to='relation.Post', verbose_name='岗位')),
+            ],
+            options={
+                'unique_together': {('dapt', 'post')},
+            },
+        ),
     ]

+ 0 - 49
relation/migrations/0002_daptpost_daptuser_postuser.py

@@ -1,49 +0,0 @@
-# Generated by Django 3.0.8 on 2020-07-24 07:50
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
-        ('relation', '0001_initial'),
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='PostUser',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_post', to='relation.Post', verbose_name='岗位')),
-                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
-            ],
-            options={
-                'unique_together': {('post', 'user')},
-            },
-        ),
-        migrations.CreateModel(
-            name='DaptUser',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_dapt', to='relation.Dapt', verbose_name='部门')),
-                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
-            ],
-            options={
-                'unique_together': {('dapt', 'user')},
-            },
-        ),
-        migrations.CreateModel(
-            name='DaptPost',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_dapt', to='relation.Dapt', verbose_name='部门')),
-                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_post', to='relation.Post', verbose_name='岗位')),
-            ],
-            options={
-                'unique_together': {('dapt', 'post')},
-            },
-        ),
-    ]

BIN
relation/migrations/__pycache__/0001_initial.cpython-37.pyc


BIN
relation/migrations/__pycache__/0002_daptpost_daptuser_postuser.cpython-37.pyc


BIN
testthree/__pycache__/settings.cpython-37.pyc


+ 2 - 1
testthree/settings.py

@@ -41,7 +41,8 @@ INSTALLED_APPS = [
     'workreport',
     'detailmptt',
     'relation',
-    'pivottable'
+    'pivottable',
+    'power'
 ]
 
 MIDDLEWARE = [

+ 2 - 1
testthree/urls.py

@@ -23,5 +23,6 @@ urlpatterns = [
     url(r'^report/', include('workreport.urls')),
     url(r'^report/mptt/', include('detailmptt.urls')),
     url(r'^report/relation/', include('relation.urls')),
-    url(r'^report/pivottable/', include('pivottable.urls'))
+    url(r'^report/pivottable/', include('pivottable.urls')),
+    url(r'^report/power/', include('power.urls'))
 ]

+ 1 - 1
workreport/migrations/0001_initial.py

@@ -1,4 +1,4 @@
-# Generated by Django 3.0.8 on 2020-07-24 07:47
+# Generated by Django 3.0.8 on 2020-08-03 07:49
 
 from django.conf import settings
 from django.db import migrations, models

BIN
workreport/migrations/__pycache__/0001_initial.cpython-37.pyc