mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
cbcab9498a
commit
95fbc27f10
@ -6,7 +6,6 @@ JSON API for the plugin app
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
from rest_framework import generics
|
from rest_framework import generics
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
|
@ -71,9 +71,11 @@ class PluginConfig(models.Model):
|
|||||||
return str(getattr(self.plugin, name, None))
|
return str(getattr(self.plugin, name, None))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
self.meta = {key: get_plugin_meta(key) for key in ['slug', 'human_name', 'description', 'author', \
|
self.meta = {
|
||||||
'pub_date', 'version', 'website', 'license', 'package_path', 'settings_url', ]}
|
key: get_plugin_meta(key) for key in ['slug', 'human_name', 'description', 'author',
|
||||||
|
'pub_date', 'version', 'website', 'license',
|
||||||
|
'package_path', 'settings_url', ]
|
||||||
|
}
|
||||||
|
|
||||||
def save(self, force_insert=False, force_update=False, *args, **kwargs):
|
def save(self, force_insert=False, force_update=False, *args, **kwargs):
|
||||||
"""extend save method to reload plugins if the 'active' status changes"""
|
"""extend save method to reload plugins if the 'active' status changes"""
|
||||||
|
2
tasks.py
2
tasks.py
@ -133,6 +133,7 @@ def rebuild_models(c):
|
|||||||
|
|
||||||
manage(c, "rebuild_models", pty=True)
|
manage(c, "rebuild_models", pty=True)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def rebuild_thumbnails(c):
|
def rebuild_thumbnails(c):
|
||||||
"""
|
"""
|
||||||
@ -141,6 +142,7 @@ def rebuild_thumbnails(c):
|
|||||||
|
|
||||||
manage(c, "rebuild_thumbnails", pty=True)
|
manage(c, "rebuild_thumbnails", pty=True)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def clean_settings(c):
|
def clean_settings(c):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user