-
-
Notifications
You must be signed in to change notification settings - Fork 693
Add Django Management Commands to Parse Board Activity Data #5503
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
Draft
rudransh-shrivastava
wants to merge
13
commits into
OWASP:feature/bod-activity-tracking
Choose a base branch
from
rudransh-shrivastava:bod-activity-parsers
base: feature/bod-activity-tracking
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
025a425
add django models to track board activity
rudransh-shrivastava 610edbb
fix spellings
rudransh-shrivastava 47549ce
don't cascade on entity member delete
rudransh-shrivastava 8b61549
add parse() to OpenAi class to get pydantic parsed output
rudransh-shrivastava cc5ca15
update code
rudransh-shrivastava 28aed4e
add parser boilerplate code
rudransh-shrivastava 881a14f
add parsers, schemas, and translators
rudransh-shrivastava f3c2d4f
add range check to month
rudransh-shrivastava 93b49f6
use datetime type for ParsedMeeting.date
rudransh-shrivastava 6059891
update code
rudransh-shrivastava d2853f2
update code
rudransh-shrivastava 5ea81f8
fix sonar qube issue in test
rudransh-shrivastava 460590f
apply bot comment
rudransh-shrivastava 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
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
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
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,16 @@ | ||
| """Board discussion admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_discussion import BoardDiscussion | ||
|
|
||
|
|
||
| class BoardDiscussionAdmin(admin.ModelAdmin): | ||
| """Admin for BoardDiscussion model.""" | ||
|
|
||
| autocomplete_fields = ("participants",) | ||
| list_display = ("topic",) | ||
| search_fields = ("topic", "description") | ||
|
|
||
|
|
||
| admin.site.register(BoardDiscussion, BoardDiscussionAdmin) |
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,18 @@ | ||
| """Board meeting admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_meeting import BoardMeeting | ||
|
|
||
|
|
||
| class BoardMeetingAdmin(admin.ModelAdmin): | ||
| """Admin for BoardMeeting model.""" | ||
|
|
||
| autocomplete_fields = ("board", "attendees", "absentees") | ||
| list_display = ("title", "date", "board", "type", "quorum_present") | ||
| list_filter = ("type", "quorum_present", "board__year") | ||
| ordering = ("-date",) | ||
| search_fields = ("title", "location", "source_path") | ||
|
|
||
|
|
||
| admin.site.register(BoardMeeting, BoardMeetingAdmin) |
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,23 @@ | ||
| """Board meeting action admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_meeting_action import BoardMeetingAction | ||
|
|
||
|
|
||
| class BoardMeetingActionAdmin(admin.ModelAdmin): | ||
| """Admin for BoardMeetingAction model.""" | ||
|
|
||
| list_display = ("meeting", "order", "discussion", "motion", "outcome") | ||
| list_filter = ("meeting__type",) | ||
| ordering = ("meeting", "order") | ||
| raw_id_fields = ("meeting", "discussion", "motion", "outcome") | ||
| search_fields = ( | ||
| "meeting__title", | ||
| "discussion__topic", | ||
| "motion__title", | ||
| "outcome__description", | ||
| ) | ||
|
|
||
|
|
||
| admin.site.register(BoardMeetingAction, BoardMeetingActionAdmin) |
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,16 @@ | ||
| """Board motion admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_motion import BoardMotion | ||
|
|
||
|
|
||
| class BoardMotionAdmin(admin.ModelAdmin): | ||
| """Admin for BoardMotion model.""" | ||
|
|
||
| list_display = ("title", "sponsor", "second") | ||
| raw_id_fields = ("sponsor", "second", "amends_motion") | ||
| search_fields = ("title", "description", "background") | ||
|
|
||
|
|
||
| admin.site.register(BoardMotion, BoardMotionAdmin) |
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,18 @@ | ||
| """Board outcome admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_outcome import BoardOutcome | ||
|
|
||
|
|
||
| class BoardOutcomeAdmin(admin.ModelAdmin): | ||
| """Admin for BoardOutcome model.""" | ||
|
|
||
| autocomplete_fields = ("assignees",) | ||
| list_display = ("description", "status", "due_date") | ||
| list_filter = ("status",) | ||
| ordering = ("-due_date",) | ||
| search_fields = ("description",) | ||
|
|
||
|
|
||
| admin.site.register(BoardOutcome, BoardOutcomeAdmin) |
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,18 @@ | ||
| """Board vote admin configuration.""" | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from apps.owasp.models.board_vote import BoardVote | ||
|
|
||
|
|
||
| class BoardVoteAdmin(admin.ModelAdmin): | ||
| """Admin for BoardVote model.""" | ||
|
|
||
| autocomplete_fields = ("in_favor", "against", "abstain", "recused") | ||
| list_display = ("motion", "result", "type", "tally") | ||
| list_filter = ("result", "type") | ||
| raw_id_fields = ("motion",) | ||
| search_fields = ("motion__title", "tally") | ||
|
|
||
|
|
||
| admin.site.register(BoardVote, BoardVoteAdmin) |
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.