Skip to content

Captcha in Django Rest Framework #3355

@bahmany

Description

@bahmany

What is the best way to handle captcha fields in django rest serializations ?

UPDATE: the senario is : when my user what to register as a new user in my app, i want to ask him to enter the captcha field. imagin somthing like this :

class UserSerializer(serializers.ModelSerializer):

# i want something for here,there is no chaptcha feild in drf# 
captcha = CaptchaField(required=True, label="I am not robot", )

username = serializers.CharField(...)
email = serializers.EmailField(...)
password = serializers.CharField(...)
confirm_password = serializers.CharField(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions