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