{"id":9672,"library":"django-eveuniverse","title":"Django Eve Universe","description":"Django Eve Universe provides a complete set of Eve Universe models, allowing easy access to EVE Online universe data fetched on-demand from ESI. It enables storing, caching, and updating critical EVE Online static data within a Django project. The current version is 1.6.1, and it maintains an active release cadence with regular updates and bug fixes.","status":"active","version":"1.6.1","language":"en","source_language":"en","source_url":"https://github.com/leviathan-ls/django-eveuniverse","tags":["django","eveonline","esi","api","universe","models","gaming"],"install":[{"cmd":"pip install django-eveuniverse","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core framework dependency, requires >=3.2","package":"Django","optional":false},{"reason":"Used for fetching data from EVE Online's ESI API, requires >=2.0.0","package":"django-esi","optional":false}],"imports":[{"symbol":"EveType","correct":"from eveuniverse.models import EveType"},{"symbol":"EveSolarSystem","correct":"from eveuniverse.models import EveSolarSystem"},{"note":"Configuration is managed via Django settings, not direct import from the package.","wrong":"from eveuniverse import EVEUNIVERSE_DATA_SOURCES","symbol":"EVEUNIVERSE_DATA_SOURCES","correct":"from django.conf import settings # Then access settings.EVEUNIVERSE_DATA_SOURCES"}],"quickstart":{"code":"import os\nimport django\nfrom django.conf import settings\n\n# Minimal Django setup for quickstart demonstration\n# In a real Django project, this setup is handled by manage.py\nif not settings.configured:\n    settings.configure(\n        INSTALLED_APPS=['django.contrib.sites', 'eveuniverse'],\n        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}},\n        SITE_ID=1,\n        EVEUNIVERSE_DATA_SOURCES={ # Configure at least one source for data loading\n            'eveuniverse.EveType': {'priority': 100, 'enabled': True}\n        }\n    )\n    django.setup()\n\nfrom eveuniverse.models import EveType\n\n# In a real setup, you would run 'python manage.py migrate'\n# and then 'python manage.py eveuniverse_load_data' to populate the database.\n# For this quickstart, we assume data is already present.\n\ntry:\n    # Example: Retrieve 'Tritanium' (a common EVE mineral)\n    tritanium = EveType.objects.get(name='Tritanium')\n    print(f\"Found Tritanium: ID {tritanium.id}, Group: {tritanium.eve_group.name if tritanium.eve_group else 'N/A'}\")\n\n    # Example: Retrieve 'Jita' solar system (which is an EveType)\n    jita_system_id = 30000142\n    jita_system = EveType.objects.get(id=jita_system_id)\n    print(f\"Found Jita system: {jita_system.name}\")\n\nexcept EveType.DoesNotExist:\n    print(\"One or more Eve Types not found. Ensure you have run 'python manage.py eveuniverse_load_data' after setup.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates basic retrieval of Eve Universe models like `EveType`. After installing `django-eveuniverse` and adding 'eveuniverse' to `INSTALLED_APPS`, you must run `python manage.py migrate` and then `python manage.py eveuniverse_load_data` to populate your database with universe entities. The `EVEUNIVERSE_DATA_SOURCES` setting in your Django `settings.py` determines which entities are loaded."},"warnings":[{"fix":"Update all references to `EveEntity` to `EveUniverseEntity` and `EveUniverseEntity` (mixin) to `EveUniverseEntityModel` in your code. Review the v1.0 migration guide for full details.","message":"Major breaking changes were introduced in version 1.0. The `EveEntity` model was renamed to `EveUniverseEntity`, and the `EveUniverseEntity` mixin was renamed to `EveUniverseEntityModel`.","severity":"breaking","affected_versions":"<1.0"},{"fix":"Add `EVEUNIVERSE_DATA_SOURCES` to your `settings.py` with the entities you need (e.g., `{'eveuniverse.EveType': {'priority': 100, 'enabled': True}}`), then execute `python manage.py eveuniverse_load_data` to populate the database. Consider setting this up as a recurring task if data needs to be kept fresh.","message":"Data for Eve Universe entities (types, groups, systems, etc.) is not automatically loaded upon installation. You must configure `EVEUNIVERSE_DATA_SOURCES` in your Django settings and then run the management command `python manage.py eveuniverse_load_data`.","severity":"gotcha","affected_versions":"All"},{"fix":"Check `setup.py` or PyPI for the exact Django version requirements for the `django-eveuniverse` version you are using. Upgrade Django if necessary, or install an older compatible version of `django-eveuniverse`.","message":"Ensure your Django version meets the minimum requirement. `django-eveuniverse` v1.x requires Django >=3.2. Older versions had different compatibility requirements.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `python manage.py migrate` to create the necessary database tables for `django-eveuniverse` models.","cause":"Database migrations for `django-eveuniverse` have not been applied.","error":"django.db.utils.ProgrammingError: relation \"eveuniverse_evetype\" does not exist"},{"fix":"Ensure `EVEUNIVERSE_DATA_SOURCES` is correctly configured in your Django `settings.py` for the relevant entity, then run `python manage.py eveuniverse_load_data`.","cause":"The requested Eve Universe entity (e.g., 'Tritanium' for `EveType`) has not been loaded into your database.","error":"EveType.DoesNotExist: EveType matching query does not exist."},{"fix":"Ensure your script or application runs within a full Django environment. If it's a standalone script, use `django.setup()` after configuring `settings` and before importing Django models.","cause":"You are attempting to access `django-eveuniverse` models or settings outside of a properly initialized Django environment (e.g., in a standalone script without `django.setup()`).","error":"ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings have not been configured."}]}