hackforla / hackforla/knowledgebase
M-M: Organization to User - create table, api, and tests
- Ngôn ngữ chính
- Python
- Star
- 2
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Dependencies
- #47
### Overview
As a user I want to be able to see what practice areas are associated with an asset group
### Action Items
- [ ] Remove ManyToMany field for Tool in the Asset Group model
- [ ] Add model AssetGroupsToolsMM with two foreign keys. See PracticeArea as an example.
- [ ] Add code something like this to model_inline.py, replacing AssetGroup with Organizations and Tool with User:
ic```
class AssetGroupsToolInline(admin.TabularInline):
model = AssetGroupsToolsMM
extra = 5
class AssetGroupsToolsAdmin(admin.ModelAdmin):
inlines = [AssetGroupToolsInline]
list_display = ("Tools.name")
search_fields = ["Tools.name"]
```
- Add to admin.py:
```
admin.register(Assets, AssetGroupsToolAdmin)
```
### Manual Verification
- From UI, you should be able to add multiple users to an organization and only the added tools will show on the screen
- From DBVisualizer or other Postgres ide you should be able to see creation and update info in AssetsToolsMM table.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra dependency #47 và ví dụ về model PracticeArea. Sau đó kiểm tra model_inline.py và admin.py, chú ý đến sự không khớp giữa tiêu đề Organization/User và các mục hành động của AssetGroup/Tool. Công việc được coi là hoàn tất khi mối quan hệ dự kiến được thể hiện, được hiển thị trong admin UI, được bao phủ bởi các bài kiểm thử, và dữ liệu tạo và cập nhật của nó có thể được xác minh trong bảng Postgres.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- postgresql, python
- Lĩnh vực
- api, backend, database, testing
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100