Skip to content

Commit

Permalink
fix: Added SharedResource to admin, fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Feb 7, 2024
1 parent 18c4b50 commit 25b9937
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions terraso_backend/apps/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Landscape,
LandscapeDevelopmentStrategy,
LandscapeGroup,
SharedResource,
TaxonomyTerm,
User,
UserPreference,
Expand Down Expand Up @@ -69,3 +70,8 @@ class TaxonomyTermAdmin(admin.ModelAdmin):
@admin.register(LandscapeDevelopmentStrategy)
class LandscapeDevelopmentStrategyAdmin(admin.ModelAdmin):
list_display = ("id", "landscape")


@admin.register(SharedResource)
class SharedResourceAdmin(admin.ModelAdmin):
list_display = ("id", "share_uuid", "share_access")
2 changes: 1 addition & 1 deletion terraso_backend/apps/core/models/shared_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SharedResource(BaseModel):
SHARE_ACCESS_TYPES = (
(SHARE_ACCESS_NO, _("No share access")),
(SHARE_ACCESS_ALL, _("Anyone with the link")),
(SHARE_ACCESS_TARGET_MEMBERS, _("Only tagert members")),
(SHARE_ACCESS_TARGET_MEMBERS, _("Only target members")),
)

source = GenericForeignKey("source_content_type", "source_object_id")
Expand Down

0 comments on commit 25b9937

Please sign in to comment.