{"id":26923,"library":"edx-django-sites-extensions","title":"edx-django-sites-extensions","description":"Custom extensions for the Django sites framework, primarily used in the Open edX platform. Current version is 6.0.0, released in 2024. Release cadence is irregular, with occasional minor and patch releases.","status":"active","version":"6.0.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/edx-django-sites-extensions","tags":["django","sites","open-edx","configuration"],"install":[{"cmd":"pip install edx-django-sites-extensions","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"The correct import path may vary; check your project's structure.","wrong":null,"symbol":"SiteConfigurationModel","correct":"from site_config_client.models import SiteConfigurationModel"}],"quickstart":{"code":"from django.contrib.sites.models import Site\nfrom site_config_client.models import SiteConfigurationModel\n\nsite = Site.objects.get_current()\nconfig, created = SiteConfigurationModel.objects.get_or_create(site=site)\nconfig.values = {'key': os.environ.get('SAMPLE_KEY', 'default')}\nconfig.save()","lang":"python","description":"Retrieve or create a SiteConfigurationModel for the current site and set a key."},"warnings":[{"fix":"Upgrade to Django 3.2+ and update to edx-django-sites-extensions>=4.0.0.","message":"Version 4.0.0 dropped support for Django 2.2 and earlier. Upgrade your Django version if pinning to older versions.","severity":"breaking","affected_versions":"<4.0.0"},{"fix":"Use Python 3.9+ or pin to <5.1.0.","message":"Python 3.8 support was dropped in version 5.1.0. Python 3.8 users must stay on <5.1.0.","severity":"deprecated","affected_versions":"5.1.0+"},{"fix":"Ensure you have the required Open edX app set up, or use django.contrib.sites directly.","message":"The library is tightly coupled to Open edX and may not be directly usable in standalone Django projects without additional configuration.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Check the imports in the documentation. The library's main module might be 'edx_django_sites_extensions' or similar.","cause":"The package 'edx-django-sites-extensions' does not expose a top-level 'site_config_client' module. The actual module name may differ.","error":"ModuleNotFoundError: No module named 'site_config_client'"},{"fix":"Verify the correct import path from the library's models module. For example: from edx_django_sites_extensions.models import SiteConfigurationModel","cause":"The model name or import path is incorrect.","error":"ImportError: cannot import name 'SiteConfigurationModel'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}