{"id":20892,"library":"aa-inactivity","title":"AA Inactivity","description":"Activity monitoring app for Alliance Auth, tracking user inactivity. Current version 2.0.1, released with compatibility for Django 3.2+ and Python 3.8+. Maintenance updates as needed.","status":"active","version":"2.0.1","language":"python","source_language":"en","source_url":"https://github.com/ppfeufer/aa-inactivity","tags":["alliance-auth","inactivity","eve-online","django","monitoring"],"install":[{"cmd":"pip install aa-inactivity","lang":"bash","label":"Alliance Auth plugin"}],"dependencies":[{"reason":"Core dependency; plugin operates within AA framework.","package":"allianceauth","optional":false}],"imports":[{"note":"Model class is Inactivity, not InactivityRecord (deprecated).","wrong":"from aa_inactivity.models import InactivityRecord","symbol":"Inactivity","correct":"from aa_inactivity.models import Inactivity"},{"note":"Used to manage corporations under inactivity monitoring.","wrong":"","symbol":"MonitoredCorporation","correct":"from aa_inactivity.models import MonitoredCorporation"}],"quickstart":{"code":"from aa_inactivity.models import Inactivity, MonitoredCorporation\nfrom django.contrib.auth.models import User\n\n# Example: create a monitored corporation\ncorp = MonitoredCorporation.objects.create(\n    corporation_id=123456,\n    corporation_name='Test Corp',\n    enable_monitoring=True\n)\nprint('Monitored corporation created:', corp)\n\n# Check user inactivity status\nuser = User.objects.get(pk=1)\ninactivity, created = Inactivity.objects.get_or_create(user=user)\nprint('Inactivity record:', inactivity.is_inactive)","lang":"python","description":"Set up monitoring for a corporation and check user inactivity."},"warnings":[{"fix":"Update imports to `from aa_inactivity.models import Inactivity` and regenerate migrations.","message":"In v2.0.0+, the model `InactivityRecord` was renamed to `Inactivity`. If you have old references or migrations referencing `InactivityRecord`, they will raise ImportError.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Upgrade AA to 2.9.0+ before installing aa-inactivity.","message":"The app requires Alliance Auth >=2.9.0. Installing with an older AA version causes import or API mismatches.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Migrate each corporation to a `MonitoredCorporation` object.","message":"The setting `AA_INACTIVITY_ENABLED_CORPORATIONS` (list of corp IDs) is deprecated in v1.x but still supported via fallback. Use `MonitoredCorporation` model instead.","severity":"deprecated","affected_versions":">=1.0.0,<2.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install aa-inactivity` and ensure your venv is active.","cause":"Package not installed or virtual environment not activated.","error":"ModuleNotFoundError: No module named 'aa_inactivity'"},{"fix":"Change import to `from aa_inactivity.models import Inactivity`.","cause":"Model renamed in v2.0.0 from InactivityRecord to Inactivity.","error":"ImportError: cannot import name 'InactivityRecord' from 'aa_inactivity.models'"},{"fix":"Wrap imports in `from django.apps import apps; apps.get_model(...)` or defer usage.","cause":"Model accessed before Django setup, often in settings or admin autodiscover.","error":"django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}