-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Kitware/annotation-endpoints
Annotation Endpoints
- Loading branch information
Showing
16 changed files
with
1,415 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -20,7 +20,8 @@ maintenance. To non-destructively update your development stack at any time: | |
2. Run `docker compose build --pull --no-cache` | ||
3. Run `docker compose run --rm django ./manage.py migrate` | ||
3. Run `docker compose run --rm django ./manage.py createsuperuser` | ||
4. Run `docker compose run --rm django ./manage.py makeclient --username [email protected] --uri http://localhost:3000/` | ||
4. Run `docker compose run --rm django ./manage.py loaddata species` to load species data into the database | ||
5. Run `docker compose run --rm django ./manage.py makeclient --username [email protected] --uri http://localhost:3000/` | ||
## Develop Natively (advanced) | ||
This configuration still uses Docker to run attached services in the background, | ||
but allows developers to run Python code on their native system. | ||
|
This file contains 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 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from .annotations import AnnotationsAdmin | ||
from .image import ImageAdmin | ||
from .recording import RecordingAdmin | ||
|
||
__all__ = [ | ||
'ImageAdmin', | ||
'RecordingAdmin', | ||
'AnnotationsAdmin', | ||
] |
This file contains 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,21 @@ | ||
from django.contrib import admin | ||
|
||
from bats_ai.core.models import Annotations | ||
|
||
|
||
@admin.register(Annotations) | ||
class AnnotationsAdmin(admin.ModelAdmin): | ||
list_display = [ | ||
'pk', | ||
'recording', | ||
'owner', | ||
'start_time', | ||
'end_time', | ||
'low_freq', | ||
'high_freq', | ||
'comments', | ||
] | ||
list_select_related = True | ||
# list_select_related = ['owner'] | ||
filter_horizontal = ('species',) # or filter_vertical | ||
autocomplete_fields = ['owner'] |
Oops, something went wrong.