hackforla / hackforla/knowledgebase

M-M: Organization to User - create table, api, and tests

Ouverte
#49 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
category: M-M complexity: medium dependency draft feature: table: organization milestone: missing role: back end dev size: 2pt
Langage dominant
Python
Étoiles
2
Forks
5
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.