# modules

Source: https://zotonic.com/docs/2046/modules

URI: https://zotonic.com/id/2046

Language: en



Access information about which [modules](/id/doc_developerguide_modules#guide-modules) are installed and which ones are active.

To test if a module is activated, for instance mod\_signup:

```django
{% if m.modules.active.mod_signup %}
    {# Do things that depend on mod_signup #}
{% endif %}
```

To print a list of all active modules:

```django
{{ m.modules.all|pprint }}
```

Available Model API Paths
-------------------------

| Method | Path pattern             | Description                                                                      |
| ------ | ------------------------ | -------------------------------------------------------------------------------- |
| `get`  | `/all/...`               | Return all known module names (enabled and disabled) for the current site.       |
| `get`  | `/enabled/...`           | Return names of currently enabled modules for the site.                          |
| `get`  | `/disabled/...`          | Return names of currently disabled modules for the site.                         |
| `get`  | `/active/+module/...`    | Return whether module `+module` is active/enabled on the current site.           |
| `get`  | `/info/+module/...`      | Return module metadata/info map for module `+module`, including `keywords` from its documentation metadata (an empty list when unavailable). |
| `get`  | `/uninstalled`           | Return uninstalled module names available on disk but not enabled for the site (`z_module_manager:get_uninstalled`). No further lookups. |
| `get`  | `/provided/+service/...` | Return whether service `+service` is provided by an active module.               |
| `get`  | `/provided`              | Return services currently provided by enabled modules (`z_module_manager:get_provided`). No further lookups. |
| `get`  | `/get_provided/...`      | Return provider modules for a requested service list (`z_module_manager:scan_provided`). |
| `get`  | `/get_depending/...`     | Return modules that depend on the given module/service list (`z_module_manager:scan_depending`). |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2046?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2046?language=en>)
