{"id":24153,"library":"openedx-django-require","title":"django-require","description":"A Django staticfiles post-processor for optimizing JavaScript with RequireJS. Version 3.0.0 is the latest; development appears to be in maintenance mode with sporadic releases.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/etianen/django-require","tags":["django","requirejs","staticfiles","optimization"],"install":[{"cmd":"pip install openedx-django-require","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required; integrates with Django's staticfiles system.","package":"Django","optional":false},{"reason":"Node.js dependency; used during optimization.","package":"requirejs","optional":true}],"imports":[{"wrong":"from require.settings import OPTIMIZER","symbol":"OPTIMIZER","correct":"from require import OPTIMIZER"}],"quickstart":{"code":"INSTALLED_APPS = [\n    ...\n    'require',\n]\n\nSTATICFILES_STORAGE = 'require.storage.OptimizedStaticFilesStorage'\n\n# Optional: configure build profile path\nREQUIRE_BUILD_PROFILE = 'path/to/build.js'","lang":"python","description":"Add 'require' to INSTALLED_APPS and set the staticfiles storage to the optimized one."},"warnings":[{"fix":"Change STATICFILES_STORAGE to 'require.storage.OptimizedStaticFilesStorage'.","message":"In version 2.x, the staticfiles storage was named 'require.storage.OptimizedCachedStaticFilesStorage'. This was removed in 3.0. Use 'require.storage.OptimizedStaticFilesStorage' instead.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use `python manage.py collectstatic` instead of `python manage.py compress_require`.","message":"The management command `compress_require` has been deprecated in favor of Django's native `collectstatic` with the optimized storage.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Ensure STATIC_URL is properly configured in your Django settings.","message":"The `REQUIREJS_BASE_URL` setting is relative to STATIC_URL. If STATIC_URL is not set correctly, the optimizer may fail to find files.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.0.0':16 'appear':21 'develop':20 'django':2,5,30 'django-requir':1 'javascript':12 'latest':19 'mainten':25 'mode':26 'optim':11,33 'post':8 'post-processor':7 'processor':9 'releas':29 'requir':3 'requirej':14,31 'sporad':28 'staticfil':6,32 'version':15","created_at":"2026-05-01T08:11:34.731182+00:00","updated_at":"2026-05-01T08:11:34.731182+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'OPTIMIZER' from 'require' (/tmp/tmp_ujxgcjy/venv/lib/python3.12/site-packages/require/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.0.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/etianen/django-require","docs":null,"changelog":null,"pypi":"https://pypi.org/project/openedx-django-require/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}