hackforla / hackforla/knowledgebase

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

Abierto
#49 0 comentarios 0 reacciones 0 asignados Ver en GitHub
category: M-M complexity: medium dependency draft feature: table: organization milestone: missing role: back end dev size: 2pt
Lenguaje dominante
Python
Estrellas
2
Forks
5
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.