Skip to content

Commit

Permalink
Add CreateOnlyCRUD
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Feb 19, 2020
1 parent 912189a commit c48dc40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/artist_app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
custom_default_patterns = views.CustomDefaultActions().url_patterns()
patterns_42 = views.Artist42CRUD().url_patterns()
plainform_patterns = views.PlainFormCRUD().url_patterns()
create_artist_only_patterns = views.CreateOnlyCRUD().url_patterns()


urlpatterns = (
Expand All @@ -30,4 +31,5 @@
+ perms_crud_song_patterns
+ patterns_42
+ plainform_patterns
+ create_artist_only_patterns
)
10 changes: 10 additions & 0 deletions tests/artist_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,13 @@ class BandCRUD(VegaCRUDView):
model = Band
protected_actions: Union[None, List[str]] = None
permissions_actions: Union[None, List[str]] = None


class CreateOnlyCRUD(VegaCRUDView):
"""Vega CRUD view created with plain form."""

model = Artist
protected_actions: Union[None, List[str]] = None
permissions_actions: Union[None, List[str]] = None
actions = ["create"]
crud_path = "create-artist-only"

0 comments on commit c48dc40

Please sign in to comment.