Skip to content

Setup mentorship app and added models #1644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2e1d631
Implemented Authentication using nextauth (#1512)
Rajgupta36 Jun 5, 2025
5cba4f7
Run make update
arkid15r Jun 5, 2025
155ded1
Bump python from 3.13.3-alpine to 3.13.4-alpine in /backend/docker (#…
dependabot[bot] Jun 5, 2025
d58bcb6
Bump python from 3.13.3-alpine to 3.13.4-alpine in /schema/docker (#1…
dependabot[bot] Jun 5, 2025
bd16ac2
Bump python from 3.13.3-alpine to 3.13.4-alpine in /docs/docker (#1559)
dependabot[bot] Jun 5, 2025
3cc918c
Run make update
arkid15r Jun 6, 2025
8e67180
docs: add Next.js to tech stack after migration (#1565)
rishyym0927 Jun 6, 2025
f09f3f1
Update event sync process: fix KeyError 'start-date'
arkid15r Jun 6, 2025
1e15ec8
Run make update
arkid15r Jun 7, 2025
55b68f5
Add test coverage for `csrf.py` (#1564)
bandhan-majumder Jun 7, 2025
f8cdcc8
Update frontend/pnpm-lock.yaml
arkid15r Jun 9, 2025
65c89d1
Merge branch 'main' into feature/contributor-hub
arkid15r Jun 11, 2025
fb2dee7
Fix Authentication related bugs (#1569)
Rajgupta36 Jun 11, 2025
581936a
setup mentorship app
Rajgupta36 Jun 14, 2025
c070c90
created mentor model
Rajgupta36 Jun 14, 2025
f72de7f
created mentee model
Rajgupta36 Jun 14, 2025
41dc533
created program model
Rajgupta36 Jun 14, 2025
ae817ae
created module model and update relations
Rajgupta36 Jun 14, 2025
f009d67
updated fields and remove unnecessary migrations
Rajgupta36 Jun 14, 2025
52ff650
format fix
Rajgupta36 Jun 14, 2025
df44372
use through model
Rajgupta36 Jun 14, 2025
434489f
cspell update
Rajgupta36 Jun 14, 2025
52ecdc6
format fix
Rajgupta36 Jun 14, 2025
b7ce593
Merge main
arkid15r Jun 15, 2025
e98743a
Merge branch 'feature/contributor-hub' into nest-schema
kasya Jun 15, 2025
a4cc363
Migrate frontend checks to local environment
arkid15r Jun 18, 2025
261b325
Merge branch 'main' into feature/contributor-hub
arkid15r Jun 18, 2025
55e9072
Update login page route (#1603)
Rajgupta36 Jun 18, 2025
a519a3d
Implement GraphQL resolvers for project health metrics (#1577)
ahmedxgouda Jun 18, 2025
7ec8603
Merge branch 'main' into feature/contributor-hub
arkid15r Jun 18, 2025
c27fa28
update models and add enrollment model
Rajgupta36 Jun 18, 2025
0e8f035
Merge branch 'feature/contributor-hub' into nest-schema
Rajgupta36 Jun 18, 2025
45f64e4
Fix test cases and update code (#1635)
Rajgupta36 Jun 19, 2025
44669ba
Update code
arkid15r Jun 19, 2025
870d0e8
Update code
arkid15r Jun 19, 2025
44f884d
Merge branch 'feature/contributor-hub' into nest-schema
kasya Jun 19, 2025
69401b4
merge main into nest-schema
Rajgupta36 Jun 20, 2025
83a52e5
fixes
Rajgupta36 Jun 20, 2025
ad12b59
Merge branch 'main' into nest-schema
Rajgupta36 Jun 21, 2025
5bcaff6
updated suggestion
Rajgupta36 Jun 21, 2025
eb16de6
Merge branch 'main' into nest-schema
Rajgupta36 Jun 21, 2025
09a2886
fix format
Rajgupta36 Jun 21, 2025
49815c9
Update code
arkid15r Jun 22, 2025
02b4da1
Merge branch 'main' into nest-schema
arkid15r Jun 22, 2025
ef7240d
Merge branch 'main' into pr/Rajgupta36/1644
arkid15r Jun 24, 2025
193da3b
Update code
arkid15r Jun 24, 2025
9c7b9a3
Restore lock files
arkid15r Jun 24, 2025
5ac60dd
Reformat migration
arkid15r Jun 24, 2025
7f79adb
Update code
arkid15r Jun 24, 2025
0ea7eaf
Update code
arkid15r Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
93 changes: 93 additions & 0 deletions backend/apps/mentorship/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
"""Mentorship app admin."""

from django.contrib import admin

from apps.mentorship.models.mentee import Mentee
from apps.mentorship.models.mentee_program import MenteeProgram
from apps.mentorship.models.mentor import Mentor
from apps.mentorship.models.module import Module
from apps.mentorship.models.program import Program


class MenteeAdmin(admin.ModelAdmin):
"""Admin view for Mentee model."""

list_display = ("github_user",)

search_fields = (
"github_user__login",
"github_user__name",
)


class MenteeProgramAdmin(admin.ModelAdmin):
"""Admin view for MenteeProgram model."""

list_display = (
"mentee",
"program",
"experience_level",
)
list_filter = (
"experience_level",
"program",
)
search_fields = (
"mentee__github_user__login",
"mentee__github_user__name",
"program__name",
)


class MentorAdmin(admin.ModelAdmin):
"""Admin view for Mentor model."""

list_display = ("github_user",)

search_fields = (
"github_user__login",
"github_user__name",
"domains",
)


class ModuleAdmin(admin.ModelAdmin):
"""Admin view for Module model."""

list_display = (
"name",
"program",
"project",
)

search_fields = (
"name",
"project__name",
)


class ProgramAdmin(admin.ModelAdmin):
"""Admin view for Program model."""

list_display = (
"name",
"status",
"started_at",
"ended_at",
)

search_fields = (
"name",
"description",
)

list_filter = ("status",)

filter_horizontal = ("admins",)


admin.site.register(MenteeProgram, MenteeProgramAdmin)
admin.site.register(Mentee, MenteeAdmin)
admin.site.register(Mentor, MentorAdmin)
admin.site.register(Module, ModuleAdmin)
admin.site.register(Program, ProgramAdmin)
6 changes: 6 additions & 0 deletions backend/apps/mentorship/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class MentorshipConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "apps.mentorship"
Loading