drop submoduls in inventory module
This commit is contained in:
parent
e0de5c018c
commit
5b07c274ef
|
@ -4,7 +4,6 @@ from flask.views import View
|
|||
from flask_login import login_required, current_user
|
||||
|
||||
from ereuse_devicehub.resources.device.models import Device
|
||||
from ereuse_devicehub.utils import is_safe_url
|
||||
|
||||
devices = Blueprint('inventory.devices', __name__, url_prefix='/inventory')
|
||||
|
||||
|
@ -14,7 +13,7 @@ class DeviceListView(View):
|
|||
template_name = 'inventory/device_list.html'
|
||||
|
||||
def dispatch_request(self):
|
||||
# import pdb; pdb.set_trace()
|
||||
# TODO @cayop adding filter
|
||||
filter_types = ['Desktop', 'Laptop', 'Server']
|
||||
devices = Device.query.filter(
|
||||
Device.owner_id == current_user.id).filter(
|
||||
|
@ -24,4 +23,4 @@ class DeviceListView(View):
|
|||
return flask.render_template(self.template_name, **context)
|
||||
|
||||
|
||||
devices.add_url_rule('/device/list/', view_func=DeviceListView.as_view('devicelist'))
|
||||
devices.add_url_rule('/device/', view_func=DeviceListView.as_view('devicelist'))
|
||||
|
|
Reference in New Issue