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 system checks for verifying that application is configured correctly #224

Closed
abhiabhi94 opened this issue Aug 18, 2021 · 1 comment
Closed

Comments

@abhiabhi94
Copy link
Collaborator

Proposed Functionality

As of now, we use checks for some functionalities to check if the application is configured correctly or not. For example see the code for verifying the order used to display comments.

Use Case

Although this works, this check is run on every incoming request that uses this part of the code. This isn't necessary because in most cases(especially in production), the configurations aren't expected to change for every request. We can probably use Django's Systems check framework to do handle this in a more efficient way.

Potential wins

From the documentation

The system check framework is a set of static checks for validating Django projects. It detects common problems and provides hints for how to fix them. The framework is extensible so you can easily add your own checks.
Checks can be triggered explicitly via the check command. Checks are triggered implicitly before most commands, including runserver and migrate. For performance reasons, checks are not run as part of the WSGI stack that is used in deployment. If you need to run system checks on your deployment server, trigger them explicitly using check.

Database Changes

None

@abhiabhi94
Copy link
Collaborator Author

closed in #235.

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

No branches or pull requests

1 participant