diff --git a/TP_PROJECT/TP/settings.py b/TP_PROJECT/TP/settings.py index 1dee54c..274f825 100644 --- a/TP_PROJECT/TP/settings.py +++ b/TP_PROJECT/TP/settings.py @@ -39,7 +39,7 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'rest_framework', 'django_filters', - 'app01' + 'app' ] MIDDLEWARE = [ diff --git a/TP_PROJECT/TP/urls.py b/TP_PROJECT/TP/urls.py index de6b545..eaa8fa9 100644 --- a/TP_PROJECT/TP/urls.py +++ b/TP_PROJECT/TP/urls.py @@ -18,5 +18,5 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), - path('api/', include('app01.urls')) + path('api/', include('app.urls')) ] diff --git a/TP_PROJECT/app01/__init__.py b/TP_PROJECT/app/__init__.py similarity index 100% rename from TP_PROJECT/app01/__init__.py rename to TP_PROJECT/app/__init__.py diff --git a/TP_PROJECT/app01/admin.py b/TP_PROJECT/app/admin.py similarity index 100% rename from TP_PROJECT/app01/admin.py rename to TP_PROJECT/app/admin.py diff --git a/TP_PROJECT/app01/apps.py b/TP_PROJECT/app/apps.py similarity index 86% rename from TP_PROJECT/app01/apps.py rename to TP_PROJECT/app/apps.py index 60a3620..ab972ce 100644 --- a/TP_PROJECT/app01/apps.py +++ b/TP_PROJECT/app/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class App01Config(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'app01' + name = 'app' diff --git a/TP_PROJECT/app01/migrations/0001_initial.py b/TP_PROJECT/app/migrations/0001_initial.py similarity index 100% rename from TP_PROJECT/app01/migrations/0001_initial.py rename to TP_PROJECT/app/migrations/0001_initial.py diff --git a/TP_PROJECT/app01/migrations/0002_auto_20230526_1003.py b/TP_PROJECT/app/migrations/0002_auto_20230526_1003.py similarity index 93% rename from TP_PROJECT/app01/migrations/0002_auto_20230526_1003.py rename to TP_PROJECT/app/migrations/0002_auto_20230526_1003.py index bf7bad9..8a62cd8 100644 --- a/TP_PROJECT/app01/migrations/0002_auto_20230526_1003.py +++ b/TP_PROJECT/app/migrations/0002_auto_20230526_1003.py @@ -6,7 +6,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('app01', '0001_initial'), + ('app', '0001_initial'), ] operations = [ diff --git a/TP_PROJECT/app01/migrations/0003_auto_20230529_1446.py b/TP_PROJECT/app/migrations/0003_auto_20230529_1446.py similarity index 96% rename from TP_PROJECT/app01/migrations/0003_auto_20230529_1446.py rename to TP_PROJECT/app/migrations/0003_auto_20230529_1446.py index 5ec91a8..714d803 100644 --- a/TP_PROJECT/app01/migrations/0003_auto_20230529_1446.py +++ b/TP_PROJECT/app/migrations/0003_auto_20230529_1446.py @@ -6,7 +6,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('app01', '0002_auto_20230526_1003'), + ('app', '0002_auto_20230526_1003'), ] operations = [ diff --git a/TP_PROJECT/app01/migrations/__init__.py b/TP_PROJECT/app/migrations/__init__.py similarity index 100% rename from TP_PROJECT/app01/migrations/__init__.py rename to TP_PROJECT/app/migrations/__init__.py diff --git a/TP_PROJECT/app01/models.py b/TP_PROJECT/app/models.py similarity index 100% rename from TP_PROJECT/app01/models.py rename to TP_PROJECT/app/models.py diff --git a/TP_PROJECT/app01/serializers.py b/TP_PROJECT/app/serializers.py similarity index 84% rename from TP_PROJECT/app01/serializers.py rename to TP_PROJECT/app/serializers.py index 0547209..8132f92 100644 --- a/TP_PROJECT/app01/serializers.py +++ b/TP_PROJECT/app/serializers.py @@ -1,5 +1,5 @@ from rest_framework import serializers -from app01.models import TP +from app.models import TP class SerialMyModel(serializers.ModelSerializer): diff --git a/TP_PROJECT/app01/tests.py b/TP_PROJECT/app/tests.py similarity index 100% rename from TP_PROJECT/app01/tests.py rename to TP_PROJECT/app/tests.py diff --git a/TP_PROJECT/app01/urls.py b/TP_PROJECT/app/urls.py similarity index 97% rename from TP_PROJECT/app01/urls.py rename to TP_PROJECT/app/urls.py index 0a6b5f8..9983c58 100644 --- a/TP_PROJECT/app01/urls.py +++ b/TP_PROJECT/app/urls.py @@ -16,7 +16,7 @@ Including another URLconf # from django.contrib import admin from django.urls import path, include from rest_framework.routers import DefaultRouter -from app01 import views +from app import views router = DefaultRouter() router.register('', views.ModelQuery) diff --git a/TP_PROJECT/app01/views.py b/TP_PROJECT/app/views.py similarity index 74% rename from TP_PROJECT/app01/views.py rename to TP_PROJECT/app/views.py index f8a1938..a6bef81 100644 --- a/TP_PROJECT/app01/views.py +++ b/TP_PROJECT/app/views.py @@ -2,8 +2,8 @@ from django.shortcuts import render # Create your views here. from rest_framework import viewsets -from app01.models import TP -from app01.serializers import SerialMyModel +from app.models import TP +from app.serializers import SerialMyModel from django_filters.rest_framework import DjangoFilterBackend diff --git a/TP_PROJECT/db.sqlite3 b/TP_PROJECT/db.sqlite3 index 305b9ee..7343e91 100644 Binary files a/TP_PROJECT/db.sqlite3 and b/TP_PROJECT/db.sqlite3 differ