kopia lustrzana https://github.com/jedie/PyInventory
commit
ad300a1592
Plik diff jest za duży
Load Diff
|
@ -36,8 +36,10 @@ readme='README.rst'
|
|||
[tool.poetry.urls]
|
||||
"Bug Tracker" = "https://github.com/jedie/PyInventory/issues"
|
||||
|
||||
license = "GPL"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
# Keep Python 3.7 until Yunohost contains a newer Python Version ;)
|
||||
python = ">=3.7,<4.0.0"
|
||||
django = "*"
|
||||
colorlog = "*" # https://github.com/borntyping/python-colorlog
|
||||
|
@ -103,8 +105,8 @@ run_testserver = 'inventory_project.manage:start_test_server'
|
|||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
|
||||
[tool.darker]
|
||||
|
@ -158,7 +160,6 @@ norecursedirs = ".* .git __pycache__ coverage* dist htmlcov volumes"
|
|||
# --full-trace
|
||||
# -p no:warnings
|
||||
addopts = """
|
||||
--import-mode=importlib
|
||||
--ignore-glob=deployment/django/*
|
||||
--reuse-db
|
||||
--nomigrations
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
from pathlib import Path
|
||||
|
||||
from bx_py_utils.test_utils.snapshot import assert_html_snapshot
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def assert_html_response_snapshot(
|
||||
response: HttpResponse,
|
||||
status_code: int = 200,
|
||||
validate: bool = True,
|
||||
):
|
||||
"""
|
||||
TODO: Move to bx_django_utils
|
||||
"""
|
||||
data = response.content.decode('utf-8')
|
||||
|
||||
assert response.status_code == status_code, (
|
||||
f'Status code is {response.status_code} but excepted {status_code}'
|
||||
)
|
||||
|
||||
assert_html_snapshot(
|
||||
got=data,
|
||||
self_file_path=Path(__file__),
|
||||
validate=validate
|
||||
)
|
|
@ -3,7 +3,10 @@ import logging
|
|||
from unittest import mock
|
||||
|
||||
from bx_django_utils.test_utils.datetime import MockDatetimeGenerator
|
||||
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin
|
||||
from bx_django_utils.test_utils.html_assertion import (
|
||||
HtmlAssertionMixin,
|
||||
assert_html_response_snapshot,
|
||||
)
|
||||
from bx_py_utils.test_utils.snapshot import assert_html_snapshot
|
||||
from django.contrib.auth.models import User
|
||||
from django.template.defaulttags import CsrfTokenNode, NowNode
|
||||
|
@ -15,7 +18,6 @@ from model_bakery import baker
|
|||
from inventory import __version__
|
||||
from inventory.models import ItemImageModel, ItemModel
|
||||
from inventory.permissions import get_or_create_normal_user_group
|
||||
from inventory_project.tests.temp_utils import assert_html_response_snapshot
|
||||
|
||||
|
||||
ITEM_FORM_DEFAULTS = {
|
||||
|
|
|
@ -1,135 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
Select Item to change | PyInventory v0.13.0
|
||||
</title>
|
||||
<link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
|
||||
<script defer="" src="/static/admin/js/nav_sidebar.js">
|
||||
</script>
|
||||
<link href="/static/admin/css/changelists.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/admin/jsi18n/">
|
||||
</script>
|
||||
<meta content="notranslate" name="google"/>
|
||||
<meta content="noindex,nofollow" name="robots">
|
||||
<link href="/static/inventory.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/static/admin/js/vendor/jquery/jquery.min.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/jquery.init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/core.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/RelatedObjectLookups.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/actions.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/urlify.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/prepopulate.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/xregexp/xregexp.min.js">
|
||||
</script>
|
||||
<meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
|
||||
<link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="NONE,NOARCHIVE" name="robots"/>
|
||||
</meta>
|
||||
</head>
|
||||
<body class="app-inventory model-itemmodel change-list" data-admin-utc-offset="MockedNowNode">
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
<h1 id="site-name">
|
||||
<a href="/admin/">
|
||||
PyInventory v0.13.0
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="user-tools">
|
||||
Welcome,
|
||||
<strong>
|
||||
NormalUser
|
||||
</strong>
|
||||
.
|
||||
<a href="/">
|
||||
View site
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/password_change/">
|
||||
Change password
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/logout/">
|
||||
Log out
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
<div class="breadcrumbs">
|
||||
<a href="/admin/">
|
||||
Home
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/">
|
||||
Inventory
|
||||
</a>
|
||||
› Items
|
||||
</div>
|
||||
<div class="main shifted" id="main">
|
||||
<button aria-label="Toggle navigation" class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar">
|
||||
</button>
|
||||
<nav class="sticky" id="nav-sidebar">
|
||||
<div class="app-inventory module current-app">
|
||||
<table>
|
||||
<caption>
|
||||
<a class="section" href="/admin/inventory/" title="Models in the Inventory application">
|
||||
Inventory
|
||||
</a>
|
||||
</caption>
|
||||
<tr class="model-itemmodel current-model">
|
||||
<th scope="row">
|
||||
<a aria-current="page" href="/admin/inventory/itemmodel/">
|
||||
Items
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/itemmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-locationmodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/locationmodel/">
|
||||
Locations
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/locationmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-memomodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/memomodel/">
|
||||
Memos
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/memomodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<!-- Content -->
|
||||
<div class="" id="content">
|
||||
<div class="" id="content">
|
||||
<h1>
|
||||
Select Item to change
|
||||
</h1>
|
||||
|
@ -384,16 +253,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
<div id="footer">
|
||||
<a href="https://github.com/jedie/PyInventory">
|
||||
https://github.com/jedie/PyInventory
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
|
@ -1,135 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
Select Item to change | PyInventory v0.13.0
|
||||
</title>
|
||||
<link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
|
||||
<script defer="" src="/static/admin/js/nav_sidebar.js">
|
||||
</script>
|
||||
<link href="/static/admin/css/changelists.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/admin/jsi18n/">
|
||||
</script>
|
||||
<meta content="notranslate" name="google"/>
|
||||
<meta content="noindex,nofollow" name="robots">
|
||||
<link href="/static/inventory.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/static/admin/js/vendor/jquery/jquery.min.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/jquery.init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/core.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/RelatedObjectLookups.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/actions.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/urlify.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/prepopulate.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/xregexp/xregexp.min.js">
|
||||
</script>
|
||||
<meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
|
||||
<link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="NONE,NOARCHIVE" name="robots"/>
|
||||
</meta>
|
||||
</head>
|
||||
<body class="app-inventory model-itemmodel change-list" data-admin-utc-offset="MockedNowNode">
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
<h1 id="site-name">
|
||||
<a href="/admin/">
|
||||
PyInventory v0.13.0
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="user-tools">
|
||||
Welcome,
|
||||
<strong>
|
||||
NormalUser
|
||||
</strong>
|
||||
.
|
||||
<a href="/">
|
||||
View site
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/password_change/">
|
||||
Change password
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/logout/">
|
||||
Log out
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
<div class="breadcrumbs">
|
||||
<a href="/admin/">
|
||||
Home
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/">
|
||||
Inventory
|
||||
</a>
|
||||
› Items
|
||||
</div>
|
||||
<div class="main shifted" id="main">
|
||||
<button aria-label="Toggle navigation" class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar">
|
||||
</button>
|
||||
<nav class="sticky" id="nav-sidebar">
|
||||
<div class="app-inventory module current-app">
|
||||
<table>
|
||||
<caption>
|
||||
<a class="section" href="/admin/inventory/" title="Models in the Inventory application">
|
||||
Inventory
|
||||
</a>
|
||||
</caption>
|
||||
<tr class="model-itemmodel current-model">
|
||||
<th scope="row">
|
||||
<a aria-current="page" href="/admin/inventory/itemmodel/">
|
||||
Items
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/itemmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-locationmodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/locationmodel/">
|
||||
Locations
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/locationmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-memomodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/memomodel/">
|
||||
Memos
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/memomodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<!-- Content -->
|
||||
<div class="" id="content">
|
||||
<div class="" id="content">
|
||||
<h1>
|
||||
Select Item to change
|
||||
</h1>
|
||||
|
@ -360,16 +229,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
<div id="footer">
|
||||
<a href="https://github.com/jedie/PyInventory">
|
||||
https://github.com/jedie/PyInventory
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
|
@ -1,38 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
Log in | PyInventory v0.13.0
|
||||
</title>
|
||||
<link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
|
||||
<script defer="" src="/static/admin/js/nav_sidebar.js">
|
||||
</script>
|
||||
<link href="/static/admin/css/login.css" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
.form-row {display: none;}
|
||||
</style>
|
||||
<meta content="notranslate" name="google"/>
|
||||
<meta content="noindex,nofollow" name="robots">
|
||||
<link href="/static/inventory.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
|
||||
<link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="NONE,NOARCHIVE" name="robots"/>
|
||||
</meta>
|
||||
</head>
|
||||
<body class="login" data-admin-utc-offset="3600">
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
<div class="main shifted" id="main">
|
||||
<div class="content">
|
||||
<!-- Content -->
|
||||
<div class="colM" id="content">
|
||||
<div class="colM" id="content">
|
||||
<script>
|
||||
document.write('<fo'+'rm act'+'ion="/admin/login/" met'+'hod="po'+'st" id="lo'+'gin-fo'+'rm">');
|
||||
</script>
|
||||
|
@ -71,11 +37,4 @@
|
|||
});
|
||||
</script>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
|
@ -1,180 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
Add Item | PyInventory v0.13.0
|
||||
</title>
|
||||
<link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
|
||||
<script defer="" src="/static/admin/js/nav_sidebar.js">
|
||||
</script>
|
||||
<link href="/static/admin/css/forms.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="notranslate" name="google"/>
|
||||
<meta content="noindex,nofollow" name="robots">
|
||||
<link href="/static/inventory.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/admin/jsi18n/">
|
||||
</script>
|
||||
<link href="/static/adminsortable2/css/sortable.css" media="all" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/vendor/select2/select2.min.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/autocomplete.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<script src="/static/admin/js/vendor/jquery/jquery.min.js">
|
||||
</script>
|
||||
<script src="/static/tagulous/tagulous.js">
|
||||
</script>
|
||||
<script data-ckeditor-basepath="/static/ckeditor/ckeditor/" id="ckeditor-init-script" src="/static/ckeditor/ckeditor-init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/calendar.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/collapse.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/select2/select2.full.min.js">
|
||||
</script>
|
||||
<script src="/static/tagulous/adaptor/select2-4.js">
|
||||
</script>
|
||||
<script src="/static/ckeditor/ckeditor/ckeditor.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/DateTimeShortcuts.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/select2/i18n/en.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/jquery.init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/core.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/autocomplete.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/inlines.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/plugins/admincompat.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/RelatedObjectLookups.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.core-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/actions.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.widget-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/urlify.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.mouse-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/prepopulate.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.touch-punch-0.2.3.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/xregexp/xregexp.min.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.sortable-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/inline-sortable.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/inline-tabular.js">
|
||||
</script>
|
||||
<meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
|
||||
<link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="NONE,NOARCHIVE" name="robots"/>
|
||||
</meta>
|
||||
</head>
|
||||
<body class="app-inventory model-itemmodel change-form" data-admin-utc-offset="MockedNowNode">
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
<h1 id="site-name">
|
||||
<a href="/admin/">
|
||||
PyInventory v0.13.0
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="user-tools">
|
||||
Welcome,
|
||||
<strong>
|
||||
NormalUser
|
||||
</strong>
|
||||
.
|
||||
<a href="/">
|
||||
View site
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/password_change/">
|
||||
Change password
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/logout/">
|
||||
Log out
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
<div class="breadcrumbs">
|
||||
<a href="/admin/">
|
||||
Home
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/">
|
||||
Inventory
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/itemmodel/">
|
||||
Items
|
||||
</a>
|
||||
› Add Item
|
||||
</div>
|
||||
<div class="main shifted" id="main">
|
||||
<button aria-label="Toggle navigation" class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar">
|
||||
</button>
|
||||
<nav class="sticky" id="nav-sidebar">
|
||||
<div class="app-inventory module current-app">
|
||||
<table>
|
||||
<caption>
|
||||
<a class="section" href="/admin/inventory/" title="Models in the Inventory application">
|
||||
Inventory
|
||||
</a>
|
||||
</caption>
|
||||
<tr class="model-itemmodel current-model">
|
||||
<th scope="row">
|
||||
<a aria-current="page" href="/admin/inventory/itemmodel/">
|
||||
Items
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/itemmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-locationmodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/locationmodel/">
|
||||
Locations
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/locationmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-memomodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/memomodel/">
|
||||
Memos
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/memomodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<!-- Content -->
|
||||
<div class="colM" id="content">
|
||||
<div class="colM" id="content">
|
||||
<h1>
|
||||
Add Item
|
||||
</h1>
|
||||
|
@ -296,9 +120,8 @@
|
|||
<label for="id_description">
|
||||
Description:
|
||||
</label>
|
||||
<div class="django-ckeditor-widget" data-field-id="id_description" style="display: inline-block;">
|
||||
<textarea cols="40" data-config='{"skin": "moono-lisa", "toolbar_Basic": [["Source", "-", "Bold", "Italic"]], "toolbar_Full": [["Styles", "Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker", "Undo", "Redo"], ["Link", "Unlink", "Anchor"], ["Image", "Flash", "Table", "HorizontalRule"], ["TextColor", "BGColor"], ["Smiley", "SpecialChar"], ["Source"]], "toolbar": "PyInventoryToolbarConfig", "height": "25em", "width": "100%", "filebrowserWindowWidth": 940, "filebrowserWindowHeight": 725, "removeButtons": "Language,Cut,Copy,Paste,Undo,Redo,Anchor", "removePlugins": ["a11yhelp", "adobeair", "ajax", "autoembed", "autolink", "bbcode", "bidi", "clipboard", "codesnippet", "codesnippetgeshi", "contextmenu", "copyformatting", "devtools", "dialog", "dialogadvtab", "div", "divarea", "docprops", "embed", "embedbase", "embedsemantic", "enterkey", "exportpdf", "find", "flash", "forms", "htmlwriter", "iframe", "iframedialog", "language", "magicline", "mathjax", "newpage", "notification", "notificationaggregator", "pagebreak", "pastefromgdocs", "pastefromword", "pastetext", "pastetools", "placeholder", "preview", "print", "save", "scayt", "selectall", "sharedspace", "smiley", "sourcedialog", "specialchar", "stylescombo", "stylesheetparser", "tab", "templates", "uicolor", "widget", "wsc", "xml"], "toolbar_PyInventoryToolbarConfig": [{"name": "basicstyles", "items": ["Bold", "Italic", "Underline", "Strike", "-", "RemoveFormat"]}, {"name": "paragraph", "items": ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"]}, {"name": "links", "items": ["Link", "Unlink", "Anchor"]}, {"name": "insert", "items": ["Image", "Table", "HorizontalRule"]}, "/", {"name": "styles", "items": ["Styles", "Format", "Font", "FontSize"]}, {"name": "colors", "items": ["TextColor", "BGColor"]}, {"name": "tools", "items": ["Maximize", "ShowBlocks", "Source"]}, {"name": "about", "items": ["About"]}], "filebrowserUploadUrl": "/ckeditor/upload/", "filebrowserBrowseUrl": "/ckeditor/browse/", "language": "en"}' data-external-plugin-resources="[]" data-id="id_description" data-processed="0" data-type="ckeditortype" id="id_description" name="description" rows="10"></textarea>
|
||||
</div>
|
||||
<textarea class="vLargeTextField" cols="40" id="id_description" name="description" rows="10">
|
||||
</textarea>
|
||||
<div class="help">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -493,18 +316,15 @@
|
|||
</th>
|
||||
<th class="required">
|
||||
Image
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10">
|
||||
</img>
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
<img alt="(BaseItemAttachmentModel.name.help_text)" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title="BaseItemAttachmentModel.name.help_text" width="10">
|
||||
</img>
|
||||
<img alt="(BaseItemAttachmentModel.name.help_text)" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title="BaseItemAttachmentModel.name.help_text" width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Tags
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10">
|
||||
</img>
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Delete?
|
||||
|
@ -571,18 +391,15 @@
|
|||
</th>
|
||||
<th class="required" colspan="2">
|
||||
File
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10">
|
||||
</img>
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
<img alt="(BaseItemAttachmentModel.name.help_text)" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title="BaseItemAttachmentModel.name.help_text" width="10">
|
||||
</img>
|
||||
<img alt="(BaseItemAttachmentModel.name.help_text)" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title="BaseItemAttachmentModel.name.help_text" width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Tags
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10">
|
||||
</img>
|
||||
<img alt="( )" class="help help-tooltip" height="10" src="/static/admin/img/icon-unknown.svg" title=" " width="10"/>
|
||||
</th>
|
||||
<th>
|
||||
Delete?
|
||||
|
@ -709,16 +526,4 @@
|
|||
</form>
|
||||
</div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
<div id="footer">
|
||||
<a href="https://github.com/jedie/PyInventory">
|
||||
https://github.com/jedie/PyInventory
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
|
@ -21,8 +21,6 @@
|
|||
</script>
|
||||
<script src="/static/tagulous/tagulous.js">
|
||||
</script>
|
||||
<script data-ckeditor-basepath="/static/ckeditor/ckeditor/" id="ckeditor-init-script" src="/static/ckeditor/ckeditor-init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/calendar.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/collapse.js">
|
||||
|
@ -31,8 +29,6 @@
|
|||
</script>
|
||||
<script src="/static/tagulous/adaptor/select2-4.js">
|
||||
</script>
|
||||
<script src="/static/ckeditor/ckeditor/ckeditor.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/DateTimeShortcuts.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/select2/i18n/en.js">
|
||||
|
@ -331,9 +327,8 @@
|
|||
<label for="id_description">
|
||||
Description:
|
||||
</label>
|
||||
<div class="django-ckeditor-widget" data-field-id="id_description" style="display: inline-block;">
|
||||
<textarea cols="40" data-config='{"skin": "moono-lisa", "toolbar_Basic": [["Source", "-", "Bold", "Italic"]], "toolbar_Full": [["Styles", "Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker", "Undo", "Redo"], ["Link", "Unlink", "Anchor"], ["Image", "Flash", "Table", "HorizontalRule"], ["TextColor", "BGColor"], ["Smiley", "SpecialChar"], ["Source"]], "toolbar": "PyInventoryToolbarConfig", "height": "25em", "width": "100%", "filebrowserWindowWidth": 940, "filebrowserWindowHeight": 725, "removeButtons": "Language,Cut,Copy,Paste,Undo,Redo,Anchor", "removePlugins": ["a11yhelp", "adobeair", "ajax", "autoembed", "autolink", "bbcode", "bidi", "clipboard", "codesnippet", "codesnippetgeshi", "contextmenu", "copyformatting", "devtools", "dialog", "dialogadvtab", "div", "divarea", "docprops", "embed", "embedbase", "embedsemantic", "enterkey", "exportpdf", "find", "flash", "forms", "htmlwriter", "iframe", "iframedialog", "language", "magicline", "mathjax", "newpage", "notification", "notificationaggregator", "pagebreak", "pastefromgdocs", "pastefromword", "pastetext", "pastetools", "placeholder", "preview", "print", "save", "scayt", "selectall", "sharedspace", "smiley", "sourcedialog", "specialchar", "stylescombo", "stylesheetparser", "tab", "templates", "uicolor", "widget", "wsc", "xml"], "toolbar_PyInventoryToolbarConfig": [{"name": "basicstyles", "items": ["Bold", "Italic", "Underline", "Strike", "-", "RemoveFormat"]}, {"name": "paragraph", "items": ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"]}, {"name": "links", "items": ["Link", "Unlink", "Anchor"]}, {"name": "insert", "items": ["Image", "Table", "HorizontalRule"]}, "/", {"name": "styles", "items": ["Styles", "Format", "Font", "FontSize"]}, {"name": "colors", "items": ["TextColor", "BGColor"]}, {"name": "tools", "items": ["Maximize", "ShowBlocks", "Source"]}, {"name": "about", "items": ["About"]}], "filebrowserUploadUrl": "/ckeditor/upload/", "filebrowserBrowseUrl": "/ckeditor/browse/", "language": "en"}' data-external-plugin-resources="[]" data-id="id_description" data-processed="0" data-type="ckeditortype" id="id_description" name="description" rows="10"></textarea>
|
||||
</div>
|
||||
<textarea class="vLargeTextField" cols="40" id="id_description" name="description" rows="10">
|
||||
</textarea>
|
||||
<div class="help">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from unittest import mock
|
||||
|
||||
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin
|
||||
from bx_django_utils.test_utils.html_assertion import (
|
||||
HtmlAssertionMixin,
|
||||
assert_html_response_snapshot,
|
||||
)
|
||||
from django.contrib.auth.models import User
|
||||
from django.template.defaulttags import CsrfTokenNode, NowNode
|
||||
from django.test import TestCase, override_settings
|
||||
|
@ -10,7 +13,6 @@ from model_bakery import baker
|
|||
from inventory import __version__
|
||||
from inventory.models import MemoImageModel, MemoModel
|
||||
from inventory.permissions import get_or_create_normal_user_group
|
||||
from inventory_project.tests.temp_utils import assert_html_response_snapshot
|
||||
|
||||
|
||||
class AdminAnonymousTests(TestCase):
|
||||
|
|
|
@ -1,176 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
Add Memo | PyInventory v0.13.0
|
||||
</title>
|
||||
<link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
|
||||
<script defer="" src="/static/admin/js/nav_sidebar.js">
|
||||
</script>
|
||||
<link href="/static/admin/css/forms.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="notranslate" name="google"/>
|
||||
<meta content="noindex,nofollow" name="robots">
|
||||
<link href="/static/inventory.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/admin/jsi18n/">
|
||||
</script>
|
||||
<link href="/static/adminsortable2/css/sortable.css" media="all" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/vendor/select2/select2.min.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/admin/css/autocomplete.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<script src="/static/admin/js/vendor/jquery/jquery.min.js">
|
||||
</script>
|
||||
<script data-ckeditor-basepath="/static/ckeditor/ckeditor/" id="ckeditor-init-script" src="/static/ckeditor/ckeditor-init.js">
|
||||
</script>
|
||||
<script src="/static/tagulous/tagulous.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/collapse.js">
|
||||
</script>
|
||||
<script src="/static/ckeditor/ckeditor/ckeditor.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/select2/select2.full.min.js">
|
||||
</script>
|
||||
<script src="/static/tagulous/adaptor/select2-4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/select2/i18n/en.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/jquery.init.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/core.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/autocomplete.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/inlines.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/plugins/admincompat.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/admin/RelatedObjectLookups.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.core-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/actions.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.widget-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/urlify.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.mouse-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/prepopulate.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.touch-punch-0.2.3.js">
|
||||
</script>
|
||||
<script src="/static/admin/js/vendor/xregexp/xregexp.min.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/libs/jquery.ui.sortable-1.11.4.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/inline-sortable.js">
|
||||
</script>
|
||||
<script src="/static/adminsortable2/js/inline-tabular.js">
|
||||
</script>
|
||||
<meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
|
||||
<link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
|
||||
<meta content="NONE,NOARCHIVE" name="robots"/>
|
||||
</meta>
|
||||
</head>
|
||||
<body class="app-inventory model-memomodel change-form" data-admin-utc-offset="MockedNowNode">
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
<h1 id="site-name">
|
||||
<a href="/admin/">
|
||||
PyInventory v0.13.0
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="user-tools">
|
||||
Welcome,
|
||||
<strong>
|
||||
NormalUser
|
||||
</strong>
|
||||
.
|
||||
<a href="/">
|
||||
View site
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/password_change/">
|
||||
Change password
|
||||
</a>
|
||||
/
|
||||
<a href="/admin/logout/">
|
||||
Log out
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
<div class="breadcrumbs">
|
||||
<a href="/admin/">
|
||||
Home
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/">
|
||||
Inventory
|
||||
</a>
|
||||
›
|
||||
<a href="/admin/inventory/memomodel/">
|
||||
Memos
|
||||
</a>
|
||||
› Add Memo
|
||||
</div>
|
||||
<div class="main shifted" id="main">
|
||||
<button aria-label="Toggle navigation" class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar">
|
||||
</button>
|
||||
<nav class="sticky" id="nav-sidebar">
|
||||
<div class="app-inventory module current-app">
|
||||
<table>
|
||||
<caption>
|
||||
<a class="section" href="/admin/inventory/" title="Models in the Inventory application">
|
||||
Inventory
|
||||
</a>
|
||||
</caption>
|
||||
<tr class="model-itemmodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/itemmodel/">
|
||||
Items
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/itemmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-locationmodel">
|
||||
<th scope="row">
|
||||
<a href="/admin/inventory/locationmodel/">
|
||||
Locations
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/locationmodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-memomodel current-model">
|
||||
<th scope="row">
|
||||
<a aria-current="page" href="/admin/inventory/memomodel/">
|
||||
Memos
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<a class="addlink" href="/admin/inventory/memomodel/add/">
|
||||
Add
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<!-- Content -->
|
||||
<div class="colM" id="content">
|
||||
<div class="colM" id="content">
|
||||
<h1>
|
||||
Add Memo
|
||||
</h1>
|
||||
|
@ -270,9 +98,8 @@
|
|||
<label for="id_memo">
|
||||
Description:
|
||||
</label>
|
||||
<div class="django-ckeditor-widget" data-field-id="id_memo" style="display: inline-block;">
|
||||
<textarea cols="40" data-config='{"skin": "moono-lisa", "toolbar_Basic": [["Source", "-", "Bold", "Italic"]], "toolbar_Full": [["Styles", "Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker", "Undo", "Redo"], ["Link", "Unlink", "Anchor"], ["Image", "Flash", "Table", "HorizontalRule"], ["TextColor", "BGColor"], ["Smiley", "SpecialChar"], ["Source"]], "toolbar": "PyInventoryToolbarConfig", "height": "25em", "width": "100%", "filebrowserWindowWidth": 940, "filebrowserWindowHeight": 725, "removeButtons": "Language,Cut,Copy,Paste,Undo,Redo,Anchor", "removePlugins": ["a11yhelp", "adobeair", "ajax", "autoembed", "autolink", "bbcode", "bidi", "clipboard", "codesnippet", "codesnippetgeshi", "contextmenu", "copyformatting", "devtools", "dialog", "dialogadvtab", "div", "divarea", "docprops", "embed", "embedbase", "embedsemantic", "enterkey", "exportpdf", "find", "flash", "forms", "htmlwriter", "iframe", "iframedialog", "language", "magicline", "mathjax", "newpage", "notification", "notificationaggregator", "pagebreak", "pastefromgdocs", "pastefromword", "pastetext", "pastetools", "placeholder", "preview", "print", "save", "scayt", "selectall", "sharedspace", "smiley", "sourcedialog", "specialchar", "stylescombo", "stylesheetparser", "tab", "templates", "uicolor", "widget", "wsc", "xml"], "toolbar_PyInventoryToolbarConfig": [{"name": "basicstyles", "items": ["Bold", "Italic", "Underline", "Strike", "-", "RemoveFormat"]}, {"name": "paragraph", "items": ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"]}, {"name": "links", "items": ["Link", "Unlink", "Anchor"]}, {"name": "insert", "items": ["Image", "Table", "HorizontalRule"]}, "/", {"name": "styles", "items": ["Styles", "Format", "Font", "FontSize"]}, {"name": "colors", "items": ["TextColor", "BGColor"]}, {"name": "tools", "items": ["Maximize", "ShowBlocks", "Source"]}, {"name": "about", "items": ["About"]}], "filebrowserUploadUrl": "/ckeditor/upload/", "filebrowserBrowseUrl": "/ckeditor/browse/", "language": "en"}' data-external-plugin-resources="[]" data-id="id_memo" data-processed="0" data-type="ckeditortype" id="id_memo" name="memo" rows="10"></textarea>
|
||||
</div>
|
||||
<textarea class="vLargeTextField" cols="40" id="id_memo" name="memo" rows="10">
|
||||
</textarea>
|
||||
<div class="help">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -521,16 +348,4 @@
|
|||
</form>
|
||||
</div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
<div id="footer">
|
||||
<a href="https://github.com/jedie/PyInventory">
|
||||
https://github.com/jedie/PyInventory
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
Ładowanie…
Reference in New Issue