Skip to content

An example extension

Once you have created your package and familiarized yourself with how the code works, you are now ready to try it out.

To install your package on your local Lime CRM installation, open your Lime console on Windows and run the following:

$ pip install -e install C:\src\cool-stuff

where C:\src\cool-stuff should be replaced with the path to your own package directory.

This will install your package in development mode, which means that you can make changes in your development directory of the package and have those changes become available in your installation without having to do another install.

Now you can browse to your new endpoint by logging in to the webclient and point your browser to https://localhost/applicationname/cool-stuff/coolstuff/?limetype=person. That should return a greeting and the number of persons in your application.

When the web server is started in debug mode, it will listen for changes on .py files in the file system, and restart the web server whenever that happens. The web server will additionally only run the web server on one thread (useful for running a debugger).

Warning

Note that this feature only should be done when developing on your local machine! When you are done developing, remember to start your 'Lime CRM Webserver' service again.

To get access to your custom event handler, you need to restart the event handler (either the Lime CRM Event handler service, or the process you started in a command prompt). Now, whenever you change the name of a person your event handler will attempt (and most likely fail) to call an external URL. You should also see a log entry in the event handlers log that shows that it's been called properly.