Open gisuser0 opened 2 months ago
Hi @gisuser0,
paver start
I don't use paver for development, but maybe it's just Python cache, have you already tried restarting the server?
https://github.com/g3w-suite/g3w-admin?tab=readme-ov-file#how-to-develop
NB For the future, if you intend to develop a third-party plugin, I also recommend you think about installable pip plugins (so you don't risk "breaking" core code)
Through https://github.com/g3w-suite/g3w-admin/pull/746 you can also get an additional idea of how to develop a custom plugin.js
in such way (using much modern code).
Sorry for the inconvenience, but we are in a fairly heavy refactoring process.
👋 Raruto
@gisuser0 were you able to solve it?
Feel free to send some PRs to improve/fix existing code/docs.
👋 Raruto
Checklist
Subject of the issue
I followed these instructions:
https://github.com/g3w-suite/g3w-client?tab=readme-ov-file#project-setup
to develop the client and I followed these instructions:
https://github.com/g3w-suite/g3w-client/tree/dev/src/plugins
to add this plugin (sidebar).
I updated the config.js file accordingly:
I changed base(); with base(this); in the service.js file (to avoid js error) and I run the cmd:
npm run dev
The plugin works and the sidebar item is shown in the client GUI (both in localhost:3000 and localhost:8000).
When I try to deploy the plugin in the production environment (g3w-admin) with the command:
npm run build
the following structure is created:
but when I run the client with the command:
paver start
this error appears:
No module named 'sidebar.urls'
If I add the file 'sidebar.url' in the folder g3w-admin/sidebar
content: urlpatterns = []
the error disappears but the plugin is not loaded in the GUI.
I added 'sidebar' also in the local_settings.py:
Do I need to edit any other config files to load the plugin in production?
Thanks in advance for any suggestions.
Steps to reproduce
``
Environment
[g3wsdk.info]
Link to your project
No response
Additional info
No response