Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest_framework_mongoengine CreateOnlyDefault() not working #279

Open
bennik88 opened this issue Jul 11, 2020 · 0 comments
Open

rest_framework_mongoengine CreateOnlyDefault() not working #279

bennik88 opened this issue Jul 11, 2020 · 0 comments

Comments

@bennik88
Copy link

bennik88 commented Jul 11, 2020

It seems like the CreateOnlyDefault() doesn't exist in rest_framework_mongoengine and does not work in combination with rest_framework.

Example:


from rest_framework_mongoengine import serializers


class ProjectCreation(EmbeddedDocument):
    project_created_by = fields.StringField(max_length=50)
    date_of_creation = fields.DateTimeField(
        default=serializers.CreateOnlyDefault(datetime.datetime.utcnow))
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

No branches or pull requests

1 participant