First commit (without Notifications)
This commit is contained in:
parent
a8d70aaecd
commit
caa7a15150
|
@ -1,9 +1,6 @@
|
|||
from django.contrib import admin
|
||||
from .models import Profile
|
||||
from django_admin_listfilter_dropdown.filters import (
|
||||
ChoiceDropdownFilter,
|
||||
RelatedDropdownFilter,
|
||||
)
|
||||
from .models import Profile # , Notification
|
||||
from django_admin_listfilter_dropdown.filters import RelatedDropdownFilter
|
||||
|
||||
|
||||
class ProfileAdmin(admin.ModelAdmin):
|
||||
|
@ -12,6 +9,9 @@ class ProfileAdmin(admin.ModelAdmin):
|
|||
autocomplete_fields = ("user",)
|
||||
|
||||
|
||||
admin.site.register(Profile, ProfileAdmin)
|
||||
|
||||
|
||||
# class NotificationAdmin(admin.ModelAdmin):
|
||||
# model = Notification
|
||||
# list_display = ("user", "gymnast", "functionality")
|
||||
|
@ -19,9 +19,8 @@ class ProfileAdmin(admin.ModelAdmin):
|
|||
# list_filter = (
|
||||
# ("user", RelatedDropdownFilter),
|
||||
# ("gymnast", RelatedDropdownFilter),
|
||||
# ("functionality", ChoiceDropdownFilter),
|
||||
# ("functionality", RelatedDropdownFilter),
|
||||
# )
|
||||
|
||||
|
||||
admin.site.register(Profile, ProfileAdmin)
|
||||
# admin.site.register(Notification, NotificationAdmin)
|
||||
|
|
|
@ -54,7 +54,11 @@ class Profile(models.Model):
|
|||
# gymnast = models.ForeignKey(
|
||||
# Gymnast, on_delete=models.CASCADE, related_name="notifications"
|
||||
# )
|
||||
# functionality = models.ForeignKey(ContentType, on_delete=models.CASCADE)
|
||||
# functionality = models.ForeignKey(
|
||||
# ContentType,
|
||||
# on_delete=models.CASCADE,
|
||||
# limit_choices_to={"app_label": "followup"},
|
||||
# )
|
||||
|
||||
# def __str__(self):
|
||||
# return f"{self.user} will be notified for add/update {self.functionality} to {self.gymnast}"
|
||||
|
|
Loading…
Reference in New Issue