-
-
Couldn't load subscription status.
- Fork 246
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
Changes from 43 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
2e1d631
Implemented Authentication using nextauth (#1512)
Rajgupta36 5cba4f7
Run make update
arkid15r 155ded1
Bump python from 3.13.3-alpine to 3.13.4-alpine in /backend/docker (#…
dependabot[bot] d58bcb6
Bump python from 3.13.3-alpine to 3.13.4-alpine in /schema/docker (#1…
dependabot[bot] bd16ac2
Bump python from 3.13.3-alpine to 3.13.4-alpine in /docs/docker (#1559)
dependabot[bot] 3cc918c
Run make update
arkid15r 8e67180
docs: add Next.js to tech stack after migration (#1565)
rishyym0927 f09f3f1
Update event sync process: fix KeyError 'start-date'
arkid15r 1e15ec8
Run make update
arkid15r 55b68f5
Add test coverage for `csrf.py` (#1564)
bandhan-majumder f8cdcc8
Update frontend/pnpm-lock.yaml
arkid15r 65c89d1
Merge branch 'main' into feature/contributor-hub
arkid15r fb2dee7
Fix Authentication related bugs (#1569)
Rajgupta36 581936a
setup mentorship app
Rajgupta36 c070c90
created mentor model
Rajgupta36 f72de7f
created mentee model
Rajgupta36 41dc533
created program model
Rajgupta36 ae817ae
created module model and update relations
Rajgupta36 f009d67
updated fields and remove unnecessary migrations
Rajgupta36 52ff650
format fix
Rajgupta36 df44372
use through model
Rajgupta36 434489f
cspell update
Rajgupta36 52ecdc6
format fix
Rajgupta36 b7ce593
Merge main
arkid15r e98743a
Merge branch 'feature/contributor-hub' into nest-schema
kasya a4cc363
Migrate frontend checks to local environment
arkid15r 261b325
Merge branch 'main' into feature/contributor-hub
arkid15r 55e9072
Update login page route (#1603)
Rajgupta36 a519a3d
Implement GraphQL resolvers for project health metrics (#1577)
ahmedxgouda 7ec8603
Merge branch 'main' into feature/contributor-hub
arkid15r c27fa28
update models and add enrollment model
Rajgupta36 0e8f035
Merge branch 'feature/contributor-hub' into nest-schema
Rajgupta36 45f64e4
Fix test cases and update code (#1635)
Rajgupta36 44669ba
Update code
arkid15r 870d0e8
Update code
arkid15r 44f884d
Merge branch 'feature/contributor-hub' into nest-schema
kasya 69401b4
merge main into nest-schema
Rajgupta36 83a52e5
fixes
Rajgupta36 ad12b59
Merge branch 'main' into nest-schema
Rajgupta36 5bcaff6
updated suggestion
Rajgupta36 eb16de6
Merge branch 'main' into nest-schema
Rajgupta36 09a2886
fix format
Rajgupta36 49815c9
Update code
arkid15r 02b4da1
Merge branch 'main' into nest-schema
arkid15r ef7240d
Merge branch 'main' into pr/Rajgupta36/1644
arkid15r 193da3b
Update code
arkid15r 9c7b9a3
Restore lock files
arkid15r 5ac60dd
Reformat migration
arkid15r 7f79adb
Update code
arkid15r 0ea7eaf
Update code
arkid15r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| """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 | ||
| from apps.mentorship.models.program_module import ProgramModule | ||
|
|
||
|
|
||
| class MenteeProgramAdmin(admin.ModelAdmin): | ||
| """Admin view for MenteeProgram model.""" | ||
|
|
||
| list_display = ( | ||
| "mentee", | ||
| "program", | ||
| "experience_level", | ||
| ) | ||
| list_filter = ("experience_level", "program") | ||
| search_fields = ("mentee__user__login", "program__name") | ||
|
|
||
|
|
||
| class MenteeAdmin(admin.ModelAdmin): | ||
| """Admin view for Mentee model.""" | ||
|
|
||
| list_display = ( | ||
| "id", | ||
| "user", | ||
| ) | ||
|
|
||
| search_fields = ("user__name",) | ||
|
|
||
|
|
||
| class MentorAdmin(admin.ModelAdmin): | ||
| """Admin view for Mentor model.""" | ||
|
|
||
| list_display = ( | ||
| "id", | ||
| "user", | ||
| ) | ||
|
|
||
| search_fields = ( | ||
| "user__name", | ||
| "domains", | ||
| ) | ||
|
|
||
|
|
||
| class ModuleAdmin(admin.ModelAdmin): | ||
| """Admin view for Module model.""" | ||
|
|
||
| list_display = ( | ||
| "name", | ||
| "project", | ||
| ) | ||
|
|
||
| search_fields = ( | ||
| "name", | ||
| "project__name", | ||
| ) | ||
|
|
||
|
|
||
| class ProgramAdmin(admin.ModelAdmin): | ||
| """Admin view for Program model.""" | ||
|
|
||
| list_display = ( | ||
| "id", | ||
| "name", | ||
| "status", | ||
| "start_date", | ||
| "end_date", | ||
| ) | ||
|
|
||
| search_fields = ( | ||
| "name", | ||
| "description", | ||
| ) | ||
|
|
||
| list_filter = ( | ||
| "status", | ||
| "start_date", | ||
| "end_date", | ||
| ) | ||
|
|
||
| filter_horizontal = ("owners",) | ||
|
|
||
|
|
||
| class ProgramModuleAdmin(admin.ModelAdmin): | ||
| """Admin view for ProgramModule model.""" | ||
|
|
||
| list_display = ( | ||
| "program", | ||
| "module", | ||
| "start_date", | ||
| "end_date", | ||
| ) | ||
| search_fields = ( | ||
| "program__name", | ||
| "module__name", | ||
| ) | ||
| list_filter = ("program",) | ||
|
|
||
|
|
||
| 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) | ||
| admin.site.register(ProgramModule, ProgramModuleAdmin) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.