refactor of file structure

This commit is contained in:
Matthias 2021-09-26 14:47:45 +02:00
parent 7393834a79
commit 7a551bf9d1
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
8 changed files with 6 additions and 7 deletions

View File

@ -164,7 +164,6 @@ def get_git_log(path):
path = path.replace(os.path.dirname(settings.BASE_DIR), '')[1:] path = path.replace(os.path.dirname(settings.BASE_DIR), '')[1:]
command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%aI%n%f%n%G?%n%GK'", '--follow', '--', path] command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%aI%n%f%n%G?%n%GK'", '--follow', '--', path]
try: try:
output = str(subprocess.check_output(command, cwd=os.path.dirname(settings.BASE_DIR)), 'utf-8')[1:-1].split('\n')
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
output = 7 * [''] output = 7 * ['']
return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4], 'verified': output[5], 'key': output[6]} return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4], 'verified': output[5], 'key': output[6]}

View File

@ -7,11 +7,11 @@ import pkgutil
import logging import logging
# Action plugins # Action plugins
import plugins.action as action import plugins.samples.action as action
from plugins.action.action import ActionPlugin from plugins.action import ActionPlugin
import plugins.integration as integration import plugins.samples.integration as integration
from plugins.integration.integration import IntegrationPlugin from plugins.integration import IntegrationPlugin
logger = logging.getLogger("inventree") logger = logging.getLogger("inventree")

View File

@ -1,5 +1,5 @@
"""sample implementation for IntegrationPlugin""" """sample implementation for IntegrationPlugin"""
from plugins.integration.integration import IntegrationPlugin, UrlsMixin from plugins.integration import IntegrationPlugin, UrlsMixin
class NoIntegrationPlugin(IntegrationPlugin): class NoIntegrationPlugin(IntegrationPlugin):

View File

@ -1,5 +1,5 @@
"""sample implementations for IntegrationPlugin""" """sample implementations for IntegrationPlugin"""
from plugins.integration.integration import SettingsMixin, UrlsMixin, NavigationMixin, IntegrationPlugin from plugins.integration import SettingsMixin, UrlsMixin, NavigationMixin, IntegrationPlugin
from django.http import HttpResponse from django.http import HttpResponse
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _