Skip to content

Conversation

@Ghosts6
Copy link

@Ghosts6 Ghosts6 commented Oct 19, 2024

This pull request introduces new custom validators, permission classes, and a test model to Django REST Framework:

  • Added AlphabeticFieldValidator to validate alphabetic characters and spaces.
  • Added AlphanumericFieldValidator to validate alphanumeric characters.
  • Added CustomLengthValidator to enforce string length limits.
  • Added IsAdminUserOrReadOnly permission class to allow only admin users to modify objects.
  • Added IsOwner permission class to allow object owners to edit their own objects.
  • Added PermissionTestModel for permission test cases.

All changes have been tested, and all tests pass.

@browniebroke
Copy link
Collaborator

According to our contributing page:

At this point in its lifespan we consider Django REST framework to be feature-complete. We focus on pull requests that track the continued development of Django versions, and generally do not accept new features or code formatting changes.

This is clearly a new feature, so no thank you.

PS: it would work nicely in a 3rd party package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants