django-bom 1.262__py3-none-any.whl
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.
Potentially problematic release.
This version of django-bom might be problematic. Click here for more details.
- bom/__init__.py +1 -0
- bom/admin.py +207 -0
- bom/apps.py +8 -0
- bom/auth_backends.py +47 -0
- bom/base_classes.py +31 -0
- bom/constants.py +217 -0
- bom/context_processors.py +9 -0
- bom/csv_headers.py +252 -0
- bom/decorators.py +32 -0
- bom/form_fields.py +59 -0
- bom/forms.py +1328 -0
- bom/helpers.py +367 -0
- bom/local_settings.py +35 -0
- bom/migrations/0001_initial.py +135 -0
- bom/migrations/0002_auto_20180908_2151.py +24 -0
- bom/migrations/0003_sellerpart_data_source.py +18 -0
- bom/migrations/0004_auto_20180911_0011.py +18 -0
- bom/migrations/0005_auto_20181007_1934.py +56 -0
- bom/migrations/0006_auto_20181007_1949.py +41 -0
- bom/migrations/0007_auto_20181009_0256.py +19 -0
- bom/migrations/0008_auto_20181030_0427.py +19 -0
- bom/migrations/0009_subpart_reference.py +18 -0
- bom/migrations/0010_auto_20181202_0733.py +23 -0
- bom/migrations/0011_auto_20181202_2113.py +22 -0
- bom/migrations/0012_partchangehistory.py +30 -0
- bom/migrations/0013_auto_20190222_1631.py +19 -0
- bom/migrations/0014_auto_20190223_2353.py +18 -0
- bom/migrations/0015_auto_20190303_1915.py +136 -0
- bom/migrations/0016_auto_20190405_2308.py +58 -0
- bom/migrations/0017_auto_20190616_1912.py +19 -0
- bom/migrations/0018_auto_20190616_2143.py +24 -0
- bom/migrations/0019_auto_20190624_1246.py +45 -0
- bom/migrations/0020_auto_20190627_0207.py +38 -0
- bom/migrations/0021_auto_20190627_0428.py +23 -0
- bom/migrations/0022_auto_20190811_2140.py +35 -0
- bom/migrations/0023_auto_20191205_2351.py +255 -0
- bom/migrations/0024_auto_20191214_1342.py +89 -0
- bom/migrations/0025_auto_20191221_1907.py +38 -0
- bom/migrations/0026_auto_20191222_2258.py +22 -0
- bom/migrations/0027_auto_20191222_2347.py +17 -0
- bom/migrations/0028_partrevision_displayable_synopsis.py +74 -0
- bom/migrations/0029_auto_20191231_1630.py +23 -0
- bom/migrations/0030_auto_20200101_2253.py +22 -0
- bom/migrations/0031_auto_20200104_1352.py +38 -0
- bom/migrations/0032_auto_20200126_1806.py +27 -0
- bom/migrations/0033_auto_20200203_0618.py +29 -0
- bom/migrations/0034_auto_20200222_0359.py +30 -0
- bom/migrations/0035_auto_20200303_0111.py +34 -0
- bom/migrations/0036_auto_20200303_0538.py +17 -0
- bom/migrations/0037_auto_20200405_1642.py +44 -0
- bom/migrations/0038_auto_20200422_0504.py +19 -0
- bom/migrations/0039_auto_20200929_2315.py +41 -0
- bom/migrations/0040_alter_organization_currency.py +19 -0
- bom/migrations/0041_organization_subscription_quantity.py +18 -0
- bom/migrations/0042_auto_20210720_2137.py +23 -0
- bom/migrations/0043_auto_20211123_0157.py +24 -0
- bom/migrations/0044_auto_20220831_1241.py +23 -0
- bom/migrations/0045_sellerpart_link.py +18 -0
- bom/migrations/0046_alter_sellerpart_unique_together.py +17 -0
- bom/migrations/0047_sellerpart_seller_part_number.py +18 -0
- bom/migrations/0048_rename_part_organization_number_class_bom_part_organiz_b333d6_idx_and_more.py +1017 -0
- bom/migrations/0049_alter_assembly_id_alter_assemblysubparts_id_and_more.py +99 -0
- bom/migrations/0050_alter_organization_options.py +17 -0
- bom/migrations/0051_alter_manufacturer_organization_and_more.py +41 -0
- bom/migrations/0052_remove_partrevision_attribute_and_more.py +584 -0
- bom/migrations/__init__.py +0 -0
- bom/models.py +886 -0
- bom/part_bom.py +192 -0
- bom/settings.py +262 -0
- bom/static/bom/css/dashboard.css +17 -0
- bom/static/bom/css/jquery.treetable.css +28 -0
- bom/static/bom/css/materialize.min.css +13 -0
- bom/static/bom/css/part-info.css +15 -0
- bom/static/bom/css/style.css +482 -0
- bom/static/bom/css/tablesorter-theme.materialize.css +176 -0
- bom/static/bom/css/treetable-theme.css +42 -0
- bom/static/bom/doc/sample_part_classes.csv +38 -0
- bom/static/bom/doc/test_bom.csv +6 -0
- bom/static/bom/doc/test_bom_5_intelligent.csv +4 -0
- bom/static/bom/doc/test_full_bom.csv +37 -0
- bom/static/bom/doc/test_new_parts.csv +5 -0
- bom/static/bom/doc/test_new_parts_5_intelligent.csv +5 -0
- bom/static/bom/img/_ionicons_svg_md-arrow-dropdown.svg +1 -0
- bom/static/bom/img/_ionicons_svg_md-arrow-dropright.svg +1 -0
- bom/static/bom/img/favicon.ico +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_disabled_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_focus_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_normal_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_dark_pressed_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_disabled_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_focus_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_normal_web.png +0 -0
- bom/static/bom/img/google/web/1x/btn_google_signin_light_pressed_web.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_disabled_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_focus_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_normal_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_dark_pressed_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_disabled_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_focus_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_normal_web@2x.png +0 -0
- bom/static/bom/img/google/web/2x/btn_google_signin_light_pressed_web@2x.png +0 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.eps +814 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.svg +24 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.eps +1866 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.svg +51 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.eps +1031 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.svg +50 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.eps +1031 -0
- bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.svg +50 -0
- bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.eps +814 -0
- bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.svg +24 -0
- bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.eps +1837 -0
- bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.svg +44 -0
- bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.eps +1002 -0
- bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.svg +43 -0
- bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.eps +1002 -0
- bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.svg +43 -0
- bom/static/bom/img/google_drive_logo.svg +1 -0
- bom/static/bom/img/indabom.png +0 -0
- bom/static/bom/img/mouser.png +0 -0
- bom/static/bom/img/octopart_blue.svg +19 -0
- bom/static/bom/js/formset-handler.js +65 -0
- bom/static/bom/js/jquery-3.4.1.min.js +2 -0
- bom/static/bom/js/jquery.ba-floatingscrollbar.min.js +10 -0
- bom/static/bom/js/jquery.treetable.js +629 -0
- bom/static/bom/js/materialize.min.js +6 -0
- bom/templates/bom/account-delete.html +23 -0
- bom/templates/bom/add-manufacturer-part.html +66 -0
- bom/templates/bom/add-sellerpart.html +93 -0
- bom/templates/bom/base-menu.html +16 -0
- bom/templates/bom/base.html +129 -0
- bom/templates/bom/bom-action-btn.html +23 -0
- bom/templates/bom/bom-action-table.html +57 -0
- bom/templates/bom/bom-base-menu.html +6 -0
- bom/templates/bom/bom-base.html +24 -0
- bom/templates/bom/bom-form-modal.html +36 -0
- bom/templates/bom/bom-form.html +30 -0
- bom/templates/bom/bom-modal-add-users.html +49 -0
- bom/templates/bom/bom-signup.html +12 -0
- bom/templates/bom/components/bom-flat.html +131 -0
- bom/templates/bom/components/bom-indented.html +237 -0
- bom/templates/bom/components/manufacturer-part-list.html +270 -0
- bom/templates/bom/components/seller-part-list.html +62 -0
- bom/templates/bom/create-part.html +65 -0
- bom/templates/bom/dashboard-menu.html +15 -0
- bom/templates/bom/dashboard.html +303 -0
- bom/templates/bom/edit-manufacturer-part.html +72 -0
- bom/templates/bom/edit-part-class.html +120 -0
- bom/templates/bom/edit-part.html +67 -0
- bom/templates/bom/edit-quantity-of-measure.html +119 -0
- bom/templates/bom/edit-user-meta.html +70 -0
- bom/templates/bom/help.html +1356 -0
- bom/templates/bom/manufacturer-info.html +82 -0
- bom/templates/bom/manufacturers.html +97 -0
- bom/templates/bom/nothing-to-see.html +15 -0
- bom/templates/bom/organization-create.html +135 -0
- bom/templates/bom/part-info.html +448 -0
- bom/templates/bom/part-revision-display.html +50 -0
- bom/templates/bom/part-revision-edit.html +39 -0
- bom/templates/bom/part-revision-manage-bom.html +115 -0
- bom/templates/bom/part-revision-new.html +57 -0
- bom/templates/bom/part-revision-release.html +41 -0
- bom/templates/bom/search-help.html +101 -0
- bom/templates/bom/seller-info.html +82 -0
- bom/templates/bom/sellers.html +97 -0
- bom/templates/bom/settings.html +734 -0
- bom/templates/bom/signup.html +28 -0
- bom/templates/bom/subscription_panel.html +16 -0
- bom/templates/bom/table_of_contents.html +47 -0
- bom/templates/bom/upload-bom.html +111 -0
- bom/templates/bom/upload-parts-help.html +103 -0
- bom/templates/bom/upload-parts.html +50 -0
- bom/templates/registration/login.html +39 -0
- bom/tests.py +1592 -0
- bom/third_party_apis/__init__.py +0 -0
- bom/third_party_apis/base_api.py +51 -0
- bom/third_party_apis/google_drive.py +166 -0
- bom/third_party_apis/mouser.py +132 -0
- bom/third_party_apis/test_apis.py +24 -0
- bom/urls.py +100 -0
- bom/utils.py +228 -0
- bom/validators.py +23 -0
- bom/views/__init__.py +0 -0
- bom/views/json_views.py +55 -0
- bom/views/views.py +1773 -0
- bom/wsgi.py +16 -0
- django_bom-1.262.dist-info/METADATA +206 -0
- django_bom-1.262.dist-info/RECORD +191 -0
- django_bom-1.262.dist-info/WHEEL +5 -0
- django_bom-1.262.dist-info/licenses/LICENSE +674 -0
- django_bom-1.262.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
{% load static %}
|
|
3
|
+
{% load materializecss %}
|
|
4
|
+
|
|
5
|
+
{% block head-title %}{{ title }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content %}
|
|
8
|
+
<div class="container" style="padding-top: 40px; max-width: 1000px;">
|
|
9
|
+
{% if profile.role == 'A' %}
|
|
10
|
+
<div class="row">
|
|
11
|
+
<form action="{% if quantity_of_measure %}{% url 'bom:quantity-of-measure-edit' quantity_of_measure_id=quantity_of_measure.id %}{% else %}{% url 'bom:quantity-of-measure-add' %}{% endif %}" method="post"
|
|
12
|
+
class="col s12">
|
|
13
|
+
{% csrf_token %}
|
|
14
|
+
|
|
15
|
+
<div class="row">
|
|
16
|
+
<div class="col s12">
|
|
17
|
+
{{ form.name|materializecss }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="row" style="margin-top: 40px; margin-bottom: 20px;">
|
|
22
|
+
<div class="col s12">
|
|
23
|
+
<h5>Units</h5>
|
|
24
|
+
<p class="grey-text text-darken-1">Define the units belonging to this quantity of measure. Base multiplier is relative to the base unit (multiplier 1.0).<br><br>For example, Voltage would have a base multiplier of 1.0, and millivolts would have a base multiplier of 0.001.</p>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div id="unit-definitions-wrapper">
|
|
29
|
+
{{ unit_formset.management_form }}
|
|
30
|
+
|
|
31
|
+
<table class="highlight" style="border-bottom: 1px solid #e0e0e0;">
|
|
32
|
+
<thead>
|
|
33
|
+
<tr class="grey-text">
|
|
34
|
+
<th style="width: 35%;">Name</th>
|
|
35
|
+
<th style="width: 20%;">Symbol</th>
|
|
36
|
+
<th style="width: 35%;">Base Multiplier</th>
|
|
37
|
+
<th style="width: 10%;" class="center-align">Action</th>
|
|
38
|
+
</tr>
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody id="unit-definitions-body">
|
|
41
|
+
{% for form in unit_formset %}
|
|
42
|
+
<tr class="unit-definition-row">
|
|
43
|
+
{% for hidden in form.hidden_fields %}
|
|
44
|
+
{{ hidden }}
|
|
45
|
+
{% endfor %}
|
|
46
|
+
|
|
47
|
+
<td>{{ form.name|materializecss }}</td>
|
|
48
|
+
<td>{{ form.symbol|materializecss }}</td>
|
|
49
|
+
<td>{{ form.base_multiplier|materializecss }}</td>
|
|
50
|
+
<td class="center-align">
|
|
51
|
+
{% if form.instance.pk %}
|
|
52
|
+
<div style="display:none;">{{ form.DELETE }}</div>
|
|
53
|
+
<a href="#!" class="btn-flat btn-small red-text delete-existing-row">
|
|
54
|
+
<i class="material-icons">delete</i>
|
|
55
|
+
</a>
|
|
56
|
+
{% else %}
|
|
57
|
+
<a href="#!" class="btn-flat btn-small red-text remove-new-row">
|
|
58
|
+
<i class="material-icons">close</i>
|
|
59
|
+
</a>
|
|
60
|
+
{% endif %}
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
{% endfor %}
|
|
64
|
+
</tbody>
|
|
65
|
+
</table>
|
|
66
|
+
|
|
67
|
+
<div class="row" style="margin-top: 15px;">
|
|
68
|
+
<div class="col s12">
|
|
69
|
+
<button type="button" class="btn-flat waves-effect"
|
|
70
|
+
id="add-unit-definition" style="padding-left: 0;">
|
|
71
|
+
<i class="material-icons left">add</i> Add Unit
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="row" style="margin-top: 50px;">
|
|
78
|
+
<div class="col s12 right-align">
|
|
79
|
+
<a href="{% url 'bom:settings' tab_anchor='indabom' %}"
|
|
80
|
+
class="btn btn-flat waves-effect"
|
|
81
|
+
style="margin-right: 10px;">Cancel</a>
|
|
82
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit" name="action">
|
|
83
|
+
Save
|
|
84
|
+
</button>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</form>
|
|
88
|
+
</div>
|
|
89
|
+
{% else %}
|
|
90
|
+
{% include 'bom/nothing-to-see.html' with required_privilege='Admin' %}
|
|
91
|
+
{% endif %}
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<script type="text/template" id="empty-form-template">
|
|
95
|
+
<tr class="unit-definition-row">
|
|
96
|
+
<td>{{ unit_formset.empty_form.name|materializecss }}</td>
|
|
97
|
+
<td>{{ unit_formset.empty_form.symbol|materializecss }}</td>
|
|
98
|
+
<td>{{ unit_formset.empty_form.base_multiplier|materializecss }}</td>
|
|
99
|
+
<td class="center-align">
|
|
100
|
+
<a href="#!" class="btn-flat btn-small red-text remove-new-row">
|
|
101
|
+
<i class="material-icons">close</i>
|
|
102
|
+
</a>
|
|
103
|
+
</td>
|
|
104
|
+
</tr>
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<script src="{% static 'bom/js/formset-handler.js' %}"></script>
|
|
108
|
+
<script>
|
|
109
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
110
|
+
initFormset({
|
|
111
|
+
prefix: '{{ unit_formset.prefix }}',
|
|
112
|
+
addBtnId: 'add-unit-definition',
|
|
113
|
+
formContainerId: 'unit-definitions-body',
|
|
114
|
+
emptyFormTemplateId: 'empty-form-template',
|
|
115
|
+
rowSelector: '.unit-definition-row'
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
</script>
|
|
119
|
+
{% endblock %}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{% extends 'bom/bom-base.html' %}
|
|
2
|
+
|
|
3
|
+
{% load materializecss %}
|
|
4
|
+
{% load static %}
|
|
5
|
+
|
|
6
|
+
{% block head-title %}{{ title }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block bom-menu %}
|
|
9
|
+
<li><a href="javascript:history.back()">Cancel</a></li>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block content %}
|
|
13
|
+
<div class="container container-app">
|
|
14
|
+
<div class="row">
|
|
15
|
+
<div class="col s12 m8 offset-m2">
|
|
16
|
+
<div class="card">
|
|
17
|
+
<div class="card-content">
|
|
18
|
+
{% if h1 %}<span class="card-title">{{ h1 }}</span>{% endif %}
|
|
19
|
+
|
|
20
|
+
<div class="row" style="margin-bottom: 30px;">
|
|
21
|
+
<div class="col s12">
|
|
22
|
+
<ul class="collection" style="border: none;">
|
|
23
|
+
<li class="collection-item avatar"
|
|
24
|
+
style="border-bottom: 1px solid #e0e0e0; min-height: 64px;">
|
|
25
|
+
<i class="material-icons circle">business</i>
|
|
26
|
+
<span class="title">Organization</span>
|
|
27
|
+
<p class="grey-text">{{ organization }}</p>
|
|
28
|
+
</li>
|
|
29
|
+
<li class="collection-item avatar"
|
|
30
|
+
style="border-bottom: 1px solid #e0e0e0; min-height: 64px;">
|
|
31
|
+
<i class="material-icons circle">person</i>
|
|
32
|
+
<span class="title">Username</span>
|
|
33
|
+
<p class="grey-text">{{ user.username }}</p>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="collection-item avatar" style="min-height: 64px;">
|
|
36
|
+
<i class="material-icons circle">email</i>
|
|
37
|
+
<span class="title">Email</span>
|
|
38
|
+
<p class="grey-text">{{ user.email }}</p>
|
|
39
|
+
</li>
|
|
40
|
+
</ul>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<form name="seller" action="{{ action }}" method="post">
|
|
45
|
+
{% csrf_token %}
|
|
46
|
+
<div class="row">
|
|
47
|
+
{{ form|materializecss:'s12' }}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="card-action"
|
|
51
|
+
style="padding: 16px 0 0 0; border-top: 1px solid rgba(160,160,160,0.2);">
|
|
52
|
+
<div class="row" style="margin-bottom: 0;">
|
|
53
|
+
<div class="col s6">
|
|
54
|
+
<a href="javascript:history.back()"
|
|
55
|
+
class="waves-effect waves-teal btn-flat grey-text">Cancel</a>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="col s6 right-align">
|
|
58
|
+
<button class="waves-effect waves-light btn btn-primary" type="submit"
|
|
59
|
+
name="action">Save Changes
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</form>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
{% endblock %}
|