Skip to content

Rename internal client app to legacy_client - #14777

Open
giohappy wants to merge 1 commit into
masterfrom
rename-geonode-client-to-legacy-client
Open

giohappy wants to merge 1 commit into
masterfrom
rename-geonode-client-to-legacy-client

Conversation

@giohappy

Copy link
Copy Markdown
Contributor

Required change in geonode-mapstore-client

The client imports the base hookset from geonode.client, which doesn't exist anymore after this PR. Without the following change GeoNode fails at startup with ImproperlyConfigured: Error importing geonode_mapstore_client.hooksets.

geonode_mapstore_client/hooksets.py must be changed to:

try:
    from geonode.legacy_client.hooksets import BaseHookSet
except ImportError:
    from geonode.client.hooksets import BaseHookSet

The change works with GeoNode both before and after this PR, so it must be merged in the client first. The tests of this PR will fail until it's available on the client's master.
The except branch can be removed once this PR is merged.

Old migrations

The migrations of the old app are removed from the code, but they remain recorded in the django_migrations table of existing deployments. They can be removed from the GeoNode database with:

DELETE FROM django_migrations WHERE app = 'geonode_client';
  • The cleanup must be done after the upgrade. If it's done before, the next migrate applies the old migrations again and the records come back.
  • It's not strictly required. The records are ignored as long as no app with the geonode_client label has its own migrations.
  • It would become mandatory if a future geonode_client app adds its own models, which is not expected. In that case its initial migration would be considered already applied.
  • No tables need to be dropped, the old migrations already removed their models.

Upgrade notes

  • Projects that import from geonode.client, or that subclass geonode.client.hooksets.BaseHookSet, must switch to geonode.legacy_client. The client_lib_tags template library keeps its name.

  • The following settings (and the corresponding environment variables) are renamed:

    • GEONODE_CLIENT_HOOKSET becomes GEONODE_LEGACY_CLIENT_HOOKSET
    • GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY becomes GEONODE_LEGACY_CLIENT_LAYER_PREVIEW_LIBRARY

    The old names are ignored without any warning. Nothing changes for deployments using the defaults. Deployments with a custom hookset, or a preview library different from mapstore, fall back to MapStore until their .env or settings are updated.

  • geonode_client has been removed from the apps and dumps lists of the sample Backup & Restore settings files. Deployments using their own copy must remove it too, otherwise the backup fails with No installed app with label 'geonode_client'. Existing backups can still be restored.

  • The settings reference in the documentation repo (basic/settings/index.rst) must be updated with the new setting name.

@cla-bot cla-bot Bot added the cla-signed CLA Bot: community license agreement signed label Nov 19, 2026
@giohappy giohappy linked an issue Nov 19, 2026 that may be closed by this pull request
1 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed CLA Bot: community license agreement signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNIP 106 - Rename the geonode.client app to geonode.legacy_client

1 participant