inventree-dummy-app-plugin 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inventree_dummy_app_plugin-0.1.0/LICENSE +21 -0
- inventree_dummy_app_plugin-0.1.0/MANIFEST.in +1 -0
- inventree_dummy_app_plugin-0.1.0/PKG-INFO +23 -0
- inventree_dummy_app_plugin-0.1.0/README.md +7 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/__init__.py +3 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/admin.py +12 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/apps.py +13 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/core.py +36 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/management/__init__.py +0 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/management/commands/__init__.py +0 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/management/commands/check_dummy_data.py +29 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/management/commands/create_dummy_data.py +33 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/migrations/0001_initial.py +47 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/migrations/__init__.py +0 -0
- inventree_dummy_app_plugin-0.1.0/dummy_app_plugin/models.py +34 -0
- inventree_dummy_app_plugin-0.1.0/inventree_dummy_app_plugin.egg-info/PKG-INFO +23 -0
- inventree_dummy_app_plugin-0.1.0/inventree_dummy_app_plugin.egg-info/SOURCES.txt +21 -0
- inventree_dummy_app_plugin-0.1.0/inventree_dummy_app_plugin.egg-info/dependency_links.txt +1 -0
- inventree_dummy_app_plugin-0.1.0/inventree_dummy_app_plugin.egg-info/entry_points.txt +2 -0
- inventree_dummy_app_plugin-0.1.0/inventree_dummy_app_plugin.egg-info/top_level.txt +2 -0
- inventree_dummy_app_plugin-0.1.0/pyproject.toml +53 -0
- inventree_dummy_app_plugin-0.1.0/setup.cfg +19 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Oliver Walters <admin@inventree.org>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include dummy_app_plugin/static *
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: inventree-dummy-app-plugin
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An InvenTree plugin which provides custom data tables
|
|
5
|
+
Author-email: Oliver Walters <admin@inventree.org>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/inventree/dummy-plugin
|
|
8
|
+
Keywords: inventree,plugin
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Framework :: InvenTree
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# DummyAppPlugin
|
|
18
|
+
|
|
19
|
+
An InvenTree plugin which provides custom data tables.
|
|
20
|
+
|
|
21
|
+
## Purposes
|
|
22
|
+
|
|
23
|
+
This plugin is *not useful*! It is intended to be used during CI testing for the InvenTree code base.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Admin site configuration for the DummyAppPlugin plugin."""
|
|
2
|
+
|
|
3
|
+
from django.contrib import admin
|
|
4
|
+
|
|
5
|
+
from .models import ExampleModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@admin.register(ExampleModel)
|
|
9
|
+
class ExampleModelAdmin(admin.ModelAdmin):
|
|
10
|
+
"""Admin interface for the ExampleModel."""
|
|
11
|
+
|
|
12
|
+
list_display = ("key", "value")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Django config for the DummyAppPlugin plugin."""
|
|
2
|
+
|
|
3
|
+
from django.apps import AppConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DummyAppPluginConfig(AppConfig):
|
|
7
|
+
"""Config class for the DummyAppPlugin plugin."""
|
|
8
|
+
|
|
9
|
+
name = "dummy_app_plugin"
|
|
10
|
+
|
|
11
|
+
def ready(self):
|
|
12
|
+
"""This function is called whenever the DummyAppPlugin plugin is loaded."""
|
|
13
|
+
...
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""An InvenTree plugin which provides custom data tables"""
|
|
2
|
+
|
|
3
|
+
from plugin import InvenTreePlugin
|
|
4
|
+
|
|
5
|
+
from plugin.mixins import AppMixin, SettingsMixin
|
|
6
|
+
|
|
7
|
+
from . import PLUGIN_VERSION
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DummyAppPlugin(AppMixin, SettingsMixin, InvenTreePlugin):
|
|
11
|
+
"""DummyAppPlugin - custom InvenTree plugin."""
|
|
12
|
+
|
|
13
|
+
# Plugin metadata
|
|
14
|
+
TITLE = "Dummy App Plugin"
|
|
15
|
+
NAME = "DummyAppPlugin"
|
|
16
|
+
SLUG = "dummy-app-plugin"
|
|
17
|
+
DESCRIPTION = "An InvenTree plugin which provides custom data tables"
|
|
18
|
+
VERSION = PLUGIN_VERSION
|
|
19
|
+
|
|
20
|
+
# Additional project information
|
|
21
|
+
AUTHOR = "Oliver Walters"
|
|
22
|
+
WEBSITE = "https://github.com/inventree/dummy-plugin"
|
|
23
|
+
LICENSE = "MIT"
|
|
24
|
+
|
|
25
|
+
MIN_VERSION = "1.2.0"
|
|
26
|
+
|
|
27
|
+
# Plugin settings (from SettingsMixin)
|
|
28
|
+
SETTINGS = {
|
|
29
|
+
# Define your plugin settings here...
|
|
30
|
+
"CUSTOM_VALUE": {
|
|
31
|
+
"name": "Custom Value",
|
|
32
|
+
"description": "A custom value",
|
|
33
|
+
"validator": int,
|
|
34
|
+
"default": 42,
|
|
35
|
+
}
|
|
36
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Custom management command to check dummy data for the DummyAppPlugin plugin.
|
|
2
|
+
|
|
3
|
+
This command is intended to be used for testing as part of CI.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from django.core.management.base import BaseCommand
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Command(BaseCommand):
|
|
10
|
+
"""Check dummy data for the DummyAppPlugin plugin."""
|
|
11
|
+
|
|
12
|
+
def handle(self, *args, **kwargs):
|
|
13
|
+
"""Check dummy data for the DummyAppPlugin plugin."""
|
|
14
|
+
from dummy_app_plugin.models import ExampleModel
|
|
15
|
+
|
|
16
|
+
print("Checking dummy data for the DummyAppPlugin plugin")
|
|
17
|
+
|
|
18
|
+
keys = [
|
|
19
|
+
"alpha",
|
|
20
|
+
"beta",
|
|
21
|
+
"gamma",
|
|
22
|
+
"delta",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
for key in keys:
|
|
26
|
+
if not ExampleModel.objects.filter(key=key).exists():
|
|
27
|
+
raise ValueError(f"Example model with key '{key}' does not exist")
|
|
28
|
+
|
|
29
|
+
print("- All dummy data for the DummyAppPlugin plugin is present!")
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Custom management command to generate date for the DummyAppPlugin plugin.
|
|
2
|
+
|
|
3
|
+
This command is intended to be used for testing as part of CI.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from django.core.management.base import BaseCommand
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Command(BaseCommand):
|
|
10
|
+
"""Generate dummy data for the DummyAppPlugin plugin."""
|
|
11
|
+
|
|
12
|
+
def handle(self, *args, **kwargs):
|
|
13
|
+
"""Generate dummy data for the DummyAppPlugin plugin."""
|
|
14
|
+
from dummy_app_plugin.models import ExampleModel
|
|
15
|
+
|
|
16
|
+
print("Generating dummy data for the DummyAppPlugin plugin")
|
|
17
|
+
|
|
18
|
+
keys = [
|
|
19
|
+
"alpha",
|
|
20
|
+
"beta",
|
|
21
|
+
"gamma",
|
|
22
|
+
"delta",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
for key in keys:
|
|
26
|
+
if ExampleModel.objects.filter(key=key).exists():
|
|
27
|
+
print(f"- Example model with key '{key}' already exists")
|
|
28
|
+
else:
|
|
29
|
+
print(f"- Creating example model with key '{key}'")
|
|
30
|
+
ExampleModel.objects.create(
|
|
31
|
+
key=key,
|
|
32
|
+
value=f"Value for {key}",
|
|
33
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Generated by Django 5.2.12 on 2026-04-02 03:06
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
initial = True
|
|
8
|
+
|
|
9
|
+
dependencies = []
|
|
10
|
+
|
|
11
|
+
operations = [
|
|
12
|
+
migrations.CreateModel(
|
|
13
|
+
name="ExampleModel",
|
|
14
|
+
fields=[
|
|
15
|
+
(
|
|
16
|
+
"id",
|
|
17
|
+
models.AutoField(
|
|
18
|
+
auto_created=True,
|
|
19
|
+
primary_key=True,
|
|
20
|
+
serialize=False,
|
|
21
|
+
verbose_name="ID",
|
|
22
|
+
),
|
|
23
|
+
),
|
|
24
|
+
(
|
|
25
|
+
"key",
|
|
26
|
+
models.CharField(
|
|
27
|
+
help_text="A unique key for the example model",
|
|
28
|
+
max_length=100,
|
|
29
|
+
unique=True,
|
|
30
|
+
verbose_name="Key",
|
|
31
|
+
),
|
|
32
|
+
),
|
|
33
|
+
(
|
|
34
|
+
"value",
|
|
35
|
+
models.CharField(
|
|
36
|
+
help_text="A value associated with the key",
|
|
37
|
+
max_length=255,
|
|
38
|
+
verbose_name="Value",
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
],
|
|
42
|
+
options={
|
|
43
|
+
"verbose_name": "Example Model",
|
|
44
|
+
"verbose_name_plural": "Example Models",
|
|
45
|
+
},
|
|
46
|
+
),
|
|
47
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Custom model definitions for the DummyAppPlugin plugin.
|
|
2
|
+
|
|
3
|
+
This file is where you can define any custom database models.
|
|
4
|
+
|
|
5
|
+
- Any models defined here will require database migrations to be created.
|
|
6
|
+
- Don't forget to register your models in the admin interface if needed!
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from django.db import models
|
|
10
|
+
from django.utils.translation import gettext_lazy as _
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ExampleModel(models.Model):
|
|
14
|
+
"""An example model for the DummyAppPlugin plugin."""
|
|
15
|
+
|
|
16
|
+
class Meta:
|
|
17
|
+
"""Meta options for the model."""
|
|
18
|
+
|
|
19
|
+
app_label = "dummy_app_plugin"
|
|
20
|
+
verbose_name = _("Example Model")
|
|
21
|
+
verbose_name_plural = _("Example Models")
|
|
22
|
+
|
|
23
|
+
key = models.CharField(
|
|
24
|
+
max_length=100,
|
|
25
|
+
unique=True,
|
|
26
|
+
verbose_name=_("Key"),
|
|
27
|
+
help_text=_("A unique key for the example model"),
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
value = models.CharField(
|
|
31
|
+
max_length=255,
|
|
32
|
+
verbose_name=_("Value"),
|
|
33
|
+
help_text=_("A value associated with the key"),
|
|
34
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: inventree-dummy-app-plugin
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An InvenTree plugin which provides custom data tables
|
|
5
|
+
Author-email: Oliver Walters <admin@inventree.org>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/inventree/dummy-plugin
|
|
8
|
+
Keywords: inventree,plugin
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Framework :: InvenTree
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# DummyAppPlugin
|
|
18
|
+
|
|
19
|
+
An InvenTree plugin which provides custom data tables.
|
|
20
|
+
|
|
21
|
+
## Purposes
|
|
22
|
+
|
|
23
|
+
This plugin is *not useful*! It is intended to be used during CI testing for the InvenTree code base.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.cfg
|
|
6
|
+
dummy_app_plugin/__init__.py
|
|
7
|
+
dummy_app_plugin/admin.py
|
|
8
|
+
dummy_app_plugin/apps.py
|
|
9
|
+
dummy_app_plugin/core.py
|
|
10
|
+
dummy_app_plugin/models.py
|
|
11
|
+
dummy_app_plugin/management/__init__.py
|
|
12
|
+
dummy_app_plugin/management/commands/__init__.py
|
|
13
|
+
dummy_app_plugin/management/commands/check_dummy_data.py
|
|
14
|
+
dummy_app_plugin/management/commands/create_dummy_data.py
|
|
15
|
+
dummy_app_plugin/migrations/0001_initial.py
|
|
16
|
+
dummy_app_plugin/migrations/__init__.py
|
|
17
|
+
inventree_dummy_app_plugin.egg-info/PKG-INFO
|
|
18
|
+
inventree_dummy_app_plugin.egg-info/SOURCES.txt
|
|
19
|
+
inventree_dummy_app_plugin.egg-info/dependency_links.txt
|
|
20
|
+
inventree_dummy_app_plugin.egg-info/entry_points.txt
|
|
21
|
+
inventree_dummy_app_plugin.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#This file is used to package the DummyAppPlugin plugin.
|
|
2
|
+
#
|
|
3
|
+
#- It was generated by the InvenTree Plugin Creator tool - version 1.13.4
|
|
4
|
+
#- Ref: https://github.com/inventree/plugin_creator
|
|
5
|
+
|
|
6
|
+
[build-system]
|
|
7
|
+
requires = ["setuptools", "twine", "wheel"]
|
|
8
|
+
build-backend = "setuptools.build_meta"
|
|
9
|
+
|
|
10
|
+
[project]
|
|
11
|
+
name = "inventree-dummy-app-plugin"
|
|
12
|
+
description = "An InvenTree plugin which provides custom data tables"
|
|
13
|
+
dynamic = ["version"]
|
|
14
|
+
authors = [
|
|
15
|
+
{ name = "Oliver Walters",email = "admin@inventree.org" },
|
|
16
|
+
]
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
license = "MIT"
|
|
19
|
+
keywords = ["inventree", "plugin"]
|
|
20
|
+
requires-python = ">=3.9"
|
|
21
|
+
dependencies = [
|
|
22
|
+
# Enter your plugin library dependencies here
|
|
23
|
+
]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
"Framework :: InvenTree",
|
|
28
|
+
]
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/inventree/dummy-plugin"
|
|
31
|
+
|
|
32
|
+
[project.entry-points."inventree_plugins"]
|
|
33
|
+
DummyAppPlugin = "dummy_app_plugin.core:DummyAppPlugin"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
where = [""]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.dynamic]
|
|
39
|
+
version = {attr = "dummy_app_plugin.PLUGIN_VERSION"}
|
|
40
|
+
|
|
41
|
+
[tool.ruff]
|
|
42
|
+
exclude = [
|
|
43
|
+
".git",
|
|
44
|
+
"__pycache__",
|
|
45
|
+
"test.py",
|
|
46
|
+
"tests",
|
|
47
|
+
"venv",
|
|
48
|
+
"env",
|
|
49
|
+
".venv",
|
|
50
|
+
".env",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
src=["dummy_app_plugin"]
|