Skip to content

Instantly share code, notes, and snippets.

@corentinbettiol
Last active March 31, 2020 14:00
Show Gist options
  • Save corentinbettiol/9e751abbd649e2b8f7d719bb0596333c to your computer and use it in GitHub Desktop.
Save corentinbettiol/9e751abbd649e2b8f7d719bb0596333c to your computer and use it in GitHub Desktop.
First optional check to be implemented. - See https://github.com/kapt-labs/django-check-seo/wiki/Custom-Checks
# optional file, see https://github.com/kapt-labs/django-check-seo/wiki/How-to-add-a-check%3F
# Standard Library
import glob
from os.path import basename, dirname, isfile, join
import sys, json
from django.conf import settings
# list files
modules = glob.glob(join(dirname(__file__), "*.py"))
__all__ = []
# add them to __all__ so they can be imported
for module in modules:
if (
isfile(module)
and not module.endswith("__init__.py")
):
__all__.append(basename(module)[:-3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment