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

Use UnsafeLoader for fixtures loading in YAML #13320

Closed
wants to merge 2 commits into from

Conversation

GProst
Copy link

@GProst GProst commented Aug 17, 2020

Ticket: https://code.djangoproject.com/ticket/31896#ticket

Currently, Django uses PyYAML's SafeLoader to load fixtures which prevent to use some advance utils like !!python/object/apply. For example, to create dates related to the current date for example, and not static dates that you have to update over time so that they aren't too old.

Anyway, there could be many reasons why a developer would want to use such an util in features. And I believe it should be safe to use UnsafeLoader for fixtures since this is certainly a data that developers create themselves.

@felixxm
Copy link
Member

felixxm commented Aug 18, 2020

Closing per ticket.

@felixxm felixxm closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants