-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add concept of "MAX_API_VERSION" * Add new LabelTemplate model type - Still retain the "old" ones (at least for now) * Modern label printing API works * Code updates * Stringyness * PEP fixes * Updated docs * Update tasks.py - Add more options for running tests * Add basic class for Plugin introspection * Add basic plugin test * Fix unit testing for plugin class * Update unit tests for label printing * fixes * linting * Update unit tests * Refactor report printing API endpoint * PEP fixes * Restrict new unit testing to modern API
- Loading branch information
1 parent
7e5effe
commit e2323bc
Showing
16 changed files
with
449 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import inventree.base | ||
|
||
|
||
class InvenTreePlugin(inventree.base.MetadataMixin, inventree.base.InventreeObject): | ||
"""Represents a PluginConfig instance on the InvenTree server.""" | ||
|
||
URL = 'plugins' | ||
|
||
def setActive(self, active: bool): | ||
"""Activate or deactivate this plugin.""" | ||
|
||
url = f'plugins/{self.pk}/activate/' | ||
|
||
self._api.post(url, data={'active': active}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.