From fe1928190e656370d581429d5b3db85e279234d3 Mon Sep 17 00:00:00 2001 From: felix Date: Mon, 18 Mar 2024 01:55:53 -0400 Subject: [PATCH] Add branch "felix_sprint-2" to CI workflow and update admin.py files --- .github/workflows/django.yml | 2 +- activmindback/core/admin.py | 7 ++++++- activmindback/tasks/admin.py | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 9e01ecbc..d73aa6a1 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -2,7 +2,7 @@ name: Django CI on: push: - branches: [ "main" ] + branches: [ "main" , "felix_sprint-2" ] pull_request: branches: [ "main" ] diff --git a/activmindback/core/admin.py b/activmindback/core/admin.py index fb1e5e35..5aafce69 100644 --- a/activmindback/core/admin.py +++ b/activmindback/core/admin.py @@ -1,4 +1,9 @@ from django.contrib import admin +from rest_framework.authtoken.models import Token -# Register your models here. +class TokenAdmin(admin.ModelAdmin): + search_fields = ('email') # Ajoutez les champs que vous souhaitez utiliser pour la recherche + +# Enregistrez le modèle Token avec TokenAdmin +admin.site.register(Token, TokenAdmin) diff --git a/activmindback/tasks/admin.py b/activmindback/tasks/admin.py index 8c38f3f3..f0db2d76 100644 --- a/activmindback/tasks/admin.py +++ b/activmindback/tasks/admin.py @@ -1,3 +1,12 @@ from django.contrib import admin +from core.models import Task, Sport, Activity, Medicament + # Register your models here. + + +# Register Task, Sport, Activity, and Medicament models +admin.site.register(Task) +admin.site.register(Sport) +admin.site.register(Activity) +admin.site.register(Medicament) \ No newline at end of file