Skip to content

Commit

Permalink
Renaming of index app to feedback (#901)
Browse files Browse the repository at this point in the history
renamed index app to feedback
  • Loading branch information
MadsNyl authored Oct 11, 2024
1 parent 1a49b08 commit 1393885
Show file tree
Hide file tree
Showing 37 changed files with 43 additions and 43 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/index/admin/admin.py → app/feedback/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib import admin

from app.index import models
from app.feedback import models

admin.site.register(models.Bug)
5 changes: 5 additions & 0 deletions app/feedback/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class FeedbackConfig(AppConfig):
name = "app.feedback"
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions app/feedback/factories/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from app.feedback.factories.bug_factory import BugFactory
from app.feedback.factories.idea_factory import IdeaFactory
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from factory.django import DjangoModelFactory

from app.content.factories import UserFactory
from app.index.models.bug import Bug
from app.feedback.models.bug import Bug


class BugFactory(DjangoModelFactory):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from factory.django import DjangoModelFactory

from app.content.factories import UserFactory
from app.index.models.idea import Idea
from app.feedback.models.idea import Idea


class IdeaFactory(DjangoModelFactory):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.5 on 2024-09-26 14:54
# Generated by Django 4.2.16 on 2024-10-11 15:33

from django.conf import settings
from django.db import migrations, models
Expand Down Expand Up @@ -80,14 +80,14 @@ class Migration(migrations.Migration):
parent_link=True,
primary_key=True,
serialize=False,
to="index.feedback",
to="feedback.feedback",
),
),
],
options={
"abstract": False,
},
bases=("index.feedback",),
bases=("feedback.feedback",),
),
migrations.CreateModel(
name="Idea",
Expand All @@ -100,13 +100,13 @@ class Migration(migrations.Migration):
parent_link=True,
primary_key=True,
serialize=False,
to="index.feedback",
to="feedback.feedback",
),
),
],
options={
"abstract": False,
},
bases=("index.feedback",),
bases=("feedback.feedback",),
),
]
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions app/feedback/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from app.feedback.models.bug import Bug
from app.feedback.models.feedback import Feedback
from app.feedback.models.idea import Idea
5 changes: 5 additions & 0 deletions app/feedback/models/bug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from app.feedback.models.feedback import Feedback


class Bug(Feedback):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from app.common.enums import AdminGroup, Groups
from app.common.permissions import BasePermissionModel, check_has_access
from app.content.models.user import User
from app.index.enums import Status
from app.feedback.enums import Status
from app.util.models import BaseModel


Expand Down
5 changes: 5 additions & 0 deletions app/feedback/models/idea.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from app.feedback.models.feedback import Feedback


class Idea(Feedback):
pass
3 changes: 3 additions & 0 deletions app/feedback/serializers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from app.feedback.serializers.bug import BugListSerializer
from app.feedback.serializers.idea import IdeaListSerializer
from app.feedback.serializers.feedback import FeedbackListPolymorphicSerializer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from app.common.serializers import BaseModelSerializer
from app.content.serializers.user import SimpleUserSerializer
from app.index.models.bug import Bug
from app.feedback.models.bug import Bug


class BugListSerializer(BaseModelSerializer):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from rest_polymorphic.serializers import PolymorphicSerializer

from app.common.serializers import BaseModelSerializer
from app.index.models import Bug, Feedback, Idea
from app.index.serializers import BugListSerializer, IdeaListSerializer
from app.feedback.models import Bug, Feedback, Idea
from app.feedback.serializers import BugListSerializer, IdeaListSerializer


class FeedbackListPolymorphicSerializer(PolymorphicSerializer, BaseModelSerializer):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from app.common.serializers import BaseModelSerializer
from app.content.serializers.user import SimpleUserSerializer
from app.index.models.idea import Idea
from app.feedback.models.idea import Idea


class IdeaListSerializer(BaseModelSerializer):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/index/urls.py → app/feedback/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.urls import include, re_path
from rest_framework import routers

from app.index.views.feedback import FeedbackViewSet
from app.feedback.views.feedback import FeedbackViewSet

router = routers.DefaultRouter()
router.register("feedbacks", FeedbackViewSet)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from app.common.pagination import BasePagination
from app.common.permissions import BasicViewPermission
from app.common.viewsets import BaseViewSet
from app.index.models.feedback import Feedback
from app.index.serializers.feedback import (
from app.feedback.models.feedback import Feedback
from app.feedback.serializers.feedback import (
BugCreateSerializer,
BugUpdateSerializer,
FeedbackListPolymorphicSerializer,
Expand Down
5 changes: 0 additions & 5 deletions app/index/app.py

This file was deleted.

2 changes: 0 additions & 2 deletions app/index/factories/__init__.py

This file was deleted.

3 changes: 0 additions & 3 deletions app/index/models/__init__.py

This file was deleted.

5 changes: 0 additions & 5 deletions app/index/models/bug.py

This file was deleted.

5 changes: 0 additions & 5 deletions app/index/models/idea.py

This file was deleted.

3 changes: 0 additions & 3 deletions app/index/serializers/__init__.py

This file was deleted.

Empty file removed app/index/views/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"app.payment",
"app.kontres",
"app.emoji",
"app.index",
"app.feedback",
"app.codex",
]

Expand Down
2 changes: 1 addition & 1 deletion app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
EventReactionFactory,
NewsReactionFactory,
)
from app.feedback.factories import BugFactory, IdeaFactory
from app.forms.tests.form_factories import FormFactory, SubmissionFactory
from app.group.factories import GroupFactory, MembershipFactory
from app.group.factories.fine_factory import FineFactory
from app.group.factories.membership_factory import MembershipHistoryFactory
from app.index.factories import BugFactory, IdeaFactory
from app.kontres.factories import BookableItemFactory, ReservationFactory
from app.payment.factories.order_factory import OrderFactory
from app.payment.factories.paid_event_factory import PaidEventFactory
Expand Down
2 changes: 1 addition & 1 deletion app/tests/index/test_feedback_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from app.util.test_utils import get_api_client

FEEDBACK_BASE_URL = "/index/feedbacks/"
FEEDBACK_BASE_URL = "/feedbacks/"


def get_data(type):
Expand Down
2 changes: 1 addition & 1 deletion app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
path("kontres/", include("app.kontres.urls")),
path("emojis/", include("app.emoji.urls")),
path("codex/", include("app.codex.urls")),
path("index/", include("app.index.urls")),
path("", include("app.feedback.urls")),
]

0 comments on commit 1393885

Please sign in to comment.