Skip to content

Commit

Permalink
Remove nibble
Browse files Browse the repository at this point in the history
No longer used, data has been exported
  • Loading branch information
henrikhorluck committed Apr 6, 2024
1 parent cfc41db commit 933e2d9
Show file tree
Hide file tree
Showing 40 changed files with 69 additions and 1,787 deletions.
37 changes: 0 additions & 37 deletions apps/authentication/api/serializers/user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
FeedbackRelationListSerializer,
GenericSurveySerializer,
)
from apps.inventory.models import Item, ItemCategory
from apps.marks.serializers import (
MarkUserSerializer,
RuleAcceptanceSerializer,
Expand All @@ -31,8 +30,6 @@
PaymentTransaction,
)
from apps.profiles.serializers import PrivacySerializer
from apps.shop.models import Order as ShopOrder
from apps.shop.models import OrderLine as ShopOrderLine
from apps.webshop.models import Order as WebshopOrder
from apps.webshop.models import OrderLine as WebshopOrderLine
from apps.webshop.models import Product as WebshopProduct
Expand Down Expand Up @@ -234,37 +231,6 @@ class Meta:
fields = ("datetime", "paid", "delivered", "orders", "subtotal")


class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = ItemCategory

fields = ("name",)


class ItemSerializer(serializers.ModelSerializer):
category = CategorySerializer()

class Meta:
model = Item
fields = ("name", "category")


class ShopOrderSerializer(serializers.ModelSerializer):
content_object = ItemSerializer()

class Meta:
model = ShopOrder
fields = ("price", "quantity", "content_object")


class ShopOrderLineSerializer(serializers.ModelSerializer):
orders = ShopOrderSerializer(many=True)

class Meta:
model = ShopOrderLine
fields = ("orders", "paid", "datetime")


class MembershipApprovalSerializer(serializers.ModelSerializer):
applicant = serializers.SerializerMethodField()
approver = serializers.SerializerMethodField()
Expand Down Expand Up @@ -317,7 +283,6 @@ class UserDataSerializer(serializers.ModelSerializer):
)
# Purchases
orderline_set = WebshopOrderLineSerializer(many=True)
shop_order_lines = ShopOrderLineSerializer(many=True)
# Marks
accepted_mark_rule_sets = RuleAcceptanceSerializer(many=True)
marks = MarkUserSerializer(many=True, source="markuser_set")
Expand Down Expand Up @@ -413,14 +378,12 @@ class Meta:
"payment_transactions",
# Purchases
"orderline_set",
"shop_order_lines",
# Approval
"applications",
"approved_applications",
# Posters
"ordered_posters",
"assigned_posters",
# Other
"magictoken_set",
"object_revisions",
)
7 changes: 0 additions & 7 deletions apps/dashboard/tools.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# -*- encoding: utf-8 -*-
from datetime import date

from django.core.exceptions import PermissionDenied
from guardian.mixins import PermissionRequiredMixin

from apps.approval.models import MembershipApproval
from apps.gallery.models import UnhandledImage
from apps.inventory.models import Batch
from apps.posters.models import Poster


Expand Down Expand Up @@ -51,11 +49,6 @@ def get_base_context(request):
processed=False
).count()

# Check if there exists a batch in inventory that has expired
if request.user.has_perm("inventory.view_item"):
if Batch.objects.filter(expiration_date__lt=date.today()):
context["inventory_expired"] = True

if request.user.has_perm("posters.view_poster"):
if Poster.objects.filter(assigned_to=None) or Poster.objects.filter(
assigned_to=request.user
Expand Down
25 changes: 0 additions & 25 deletions apps/inventory/admin.py

This file was deleted.

Empty file.
39 changes: 0 additions & 39 deletions apps/inventory/dashboard/forms.py

This file was deleted.

57 changes: 0 additions & 57 deletions apps/inventory/dashboard/urls.py

This file was deleted.

Loading

0 comments on commit 933e2d9

Please sign in to comment.