{"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":[{"note":"Used to configure RequireJS optimizer path in settings","symbol":"OPTIMIZER","correct":"from require.settings import OPTIMIZER"},{"symbol":"RequireJSException","correct":"from require.exceptions import RequireJSException"}],"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with `pip install openedx-django-require` and add 'require' to INSTALLED_APPS.","cause":"The 'require' app is not installed or the package is not installed.","error":"ImportError: No module named 'require'"},{"fix":"Add 'REQUIREJS_BASE_URL = 'js/lib'' (or your base path) to settings.","cause":"Missing required setting REQUIREJS_BASE_URL.","error":"django.core.exceptions.ImproperlyConfigured: The REQUIREJS_BASE_URL setting is not set."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}