django-bom 1.193__tar.gz → 1.237__tar.gz
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.
- django_bom-1.237/PKG-INFO +206 -0
- {django-bom-1.193 → django_bom-1.237}/README.md +7 -8
- {django-bom-1.193 → django_bom-1.237}/bom/admin.py +23 -2
- {django-bom-1.193 → django_bom-1.237}/bom/base_classes.py +1 -1
- {django-bom-1.193 → django_bom-1.237}/bom/constants.py +4 -0
- {django-bom-1.193 → django_bom-1.237}/bom/csv_headers.py +20 -6
- django_bom-1.237/bom/decorators.py +32 -0
- {django-bom-1.193 → django_bom-1.237}/bom/forms.py +357 -225
- {django-bom-1.193 → django_bom-1.237}/bom/helpers.py +19 -4
- django_bom-1.237/bom/local_settings.py +35 -0
- django_bom-1.237/bom/migrations/0040_alter_organization_currency.py +19 -0
- django_bom-1.237/bom/migrations/0041_organization_subscription_quantity.py +18 -0
- django_bom-1.237/bom/migrations/0042_auto_20210720_2137.py +23 -0
- django_bom-1.237/bom/migrations/0043_auto_20211123_0157.py +24 -0
- django_bom-1.237/bom/migrations/0044_auto_20220831_1241.py +23 -0
- django_bom-1.237/bom/migrations/0045_sellerpart_link.py +18 -0
- django_bom-1.237/bom/migrations/0046_alter_sellerpart_unique_together.py +17 -0
- django_bom-1.237/bom/migrations/0047_sellerpart_seller_part_number.py +18 -0
- django_bom-1.237/bom/migrations/0048_rename_part_organization_number_class_bom_part_organiz_b333d6_idx_and_more.py +1017 -0
- django_bom-1.237/bom/migrations/0049_alter_assembly_id_alter_assemblysubparts_id_and_more.py +99 -0
- {django-bom-1.193 → django_bom-1.237}/bom/models.py +168 -93
- {django-bom-1.193 → django_bom-1.237}/bom/part_bom.py +21 -10
- django_bom-1.237/bom/settings.py +264 -0
- django_bom-1.237/bom/static/bom/css/dashboard.css +17 -0
- django_bom-1.237/bom/static/bom/css/part-info.css +15 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/css/style.css +124 -12
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/css/treetable-theme.css +10 -10
- django_bom-1.237/bom/static/bom/doc/sample_part_classes.csv +38 -0
- django_bom-1.237/bom/static/bom/doc/test_bom.csv +6 -0
- django_bom-1.237/bom/static/bom/doc/test_bom_5_intelligent.csv +4 -0
- django_bom-1.237/bom/static/bom/doc/test_full_bom.csv +37 -0
- django_bom-1.237/bom/static/bom/doc/test_new_parts.csv +5 -0
- django_bom-1.237/bom/static/bom/doc/test_new_parts_5_intelligent.csv +5 -0
- django_bom-1.237/bom/templates/bom/account-delete.html +23 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/add-manufacturer-part.html +2 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/add-sellerpart.html +9 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/base-menu.html +10 -1
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/base.html +3 -2
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/bom-action-table.html +2 -2
- django_bom-1.237/bom/templates/bom/bom-base-menu.html +6 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/bom-base.html +1 -0
- django_bom-1.237/bom/templates/bom/bom-form-modal.html +36 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/bom-form.html +1 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/bom-signup.html +0 -4
- {django-bom-1.193/bom/templates/bom → django_bom-1.237/bom/templates/bom/components}/bom-flat.html +5 -5
- {django-bom-1.193/bom/templates/bom → django_bom-1.237/bom/templates/bom/components}/bom-indented.html +40 -7
- django_bom-1.237/bom/templates/bom/components/manufacturer-part-list.html +270 -0
- django_bom-1.237/bom/templates/bom/components/seller-part-list.html +62 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/create-part.html +2 -5
- django_bom-1.237/bom/templates/bom/dashboard.html +303 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/edit-manufacturer-part.html +8 -6
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/edit-part-class.html +2 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/edit-part.html +2 -6
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/edit-user-meta.html +2 -5
- django_bom-1.237/bom/templates/bom/help.html +1356 -0
- django_bom-1.237/bom/templates/bom/manufacturer-info.html +82 -0
- django_bom-1.237/bom/templates/bom/manufacturers.html +97 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/organization-create.html +2 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-info.html +21 -251
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-revision-display.html +6 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-revision-edit.html +2 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-revision-manage-bom.html +2 -3
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-revision-new.html +2 -5
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/part-revision-release.html +0 -7
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/search-help.html +0 -4
- django_bom-1.237/bom/templates/bom/seller-info.html +82 -0
- django_bom-1.237/bom/templates/bom/sellers.html +97 -0
- django_bom-1.237/bom/templates/bom/settings.html +408 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/signup.html +1 -1
- django_bom-1.237/bom/templates/bom/table_of_contents.html +47 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/upload-bom.html +21 -26
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/upload-parts-help.html +18 -7
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/upload-parts.html +0 -4
- {django-bom-1.193 → django_bom-1.237}/bom/tests.py +256 -52
- {django-bom-1.193 → django_bom-1.237}/bom/third_party_apis/base_api.py +1 -1
- {django-bom-1.193 → django_bom-1.237}/bom/third_party_apis/google_drive.py +14 -6
- {django-bom-1.193 → django_bom-1.237}/bom/third_party_apis/mouser.py +1 -0
- {django-bom-1.193 → django_bom-1.237}/bom/urls.py +25 -10
- {django-bom-1.193 → django_bom-1.237}/bom/views/json_views.py +1 -1
- {django-bom-1.193 → django_bom-1.237}/bom/views/views.py +320 -117
- django_bom-1.237/django_bom.egg-info/PKG-INFO +206 -0
- {django-bom-1.193 → django_bom-1.237}/django_bom.egg-info/SOURCES.txt +30 -6
- django_bom-1.237/django_bom.egg-info/requires.txt +6 -0
- django_bom-1.237/pyproject.toml +70 -0
- django-bom-1.193/PKG-INFO +0 -196
- django-bom-1.193/bom/decorators.py +0 -18
- django-bom-1.193/bom/local_settings.py +0 -36
- django-bom-1.193/bom/settings.py +0 -219
- django-bom-1.193/bom/static/.DS_Store +0 -0
- django-bom-1.193/bom/static/bom/.DS_Store +0 -0
- django-bom-1.193/bom/static/bom/img/.DS_Store +0 -0
- django-bom-1.193/bom/templates/bom/bom-base-menu.html +0 -4
- django-bom-1.193/bom/templates/bom/dashboard.html +0 -295
- django-bom-1.193/bom/templates/bom/help.html +0 -1108
- django-bom-1.193/bom/templates/bom/settings.html +0 -402
- django-bom-1.193/django_bom.egg-info/PKG-INFO +0 -196
- django-bom-1.193/django_bom.egg-info/requires.txt +0 -5
- django-bom-1.193/setup.py +0 -41
- {django-bom-1.193 → django_bom-1.237}/LICENSE +0 -0
- {django-bom-1.193 → django_bom-1.237}/MANIFEST.in +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/__init__.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/apps.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/context_processors.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/form_fields.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0001_initial.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0002_auto_20180908_2151.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0003_sellerpart_data_source.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0004_auto_20180911_0011.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0005_auto_20181007_1934.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0006_auto_20181007_1949.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0007_auto_20181009_0256.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0008_auto_20181030_0427.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0009_subpart_reference.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0010_auto_20181202_0733.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0011_auto_20181202_2113.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0012_partchangehistory.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0013_auto_20190222_1631.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0014_auto_20190223_2353.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0015_auto_20190303_1915.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0016_auto_20190405_2308.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0017_auto_20190616_1912.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0018_auto_20190616_2143.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0019_auto_20190624_1246.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0020_auto_20190627_0207.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0021_auto_20190627_0428.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0022_auto_20190811_2140.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0023_auto_20191205_2351.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0024_auto_20191214_1342.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0025_auto_20191221_1907.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0026_auto_20191222_2258.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0027_auto_20191222_2347.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0028_partrevision_displayable_synopsis.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0029_auto_20191231_1630.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0030_auto_20200101_2253.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0031_auto_20200104_1352.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0032_auto_20200126_1806.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0033_auto_20200203_0618.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0034_auto_20200222_0359.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0035_auto_20200303_0111.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0036_auto_20200303_0538.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0037_auto_20200405_1642.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0038_auto_20200422_0504.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/0039_auto_20200929_2315.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/migrations/__init__.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/css/jquery.treetable.css +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/css/materialize.min.css +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/css/tablesorter-theme.materialize.css +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/_ionicons_svg_md-arrow-dropdown.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/_ionicons_svg_md-arrow-dropright.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/favicon.ico +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_dark_disabled_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_dark_focus_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_dark_normal_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_dark_pressed_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_light_disabled_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_light_focus_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_light_normal_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/1x/btn_google_signin_light_pressed_web.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_dark_disabled_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_dark_focus_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_dark_normal_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_dark_pressed_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_light_disabled_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_light_focus_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_light_normal_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/2x/btn_google_signin_light_pressed_web@2x.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_disabled_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_focus_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_normal_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_dark_pressed_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_disabled_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_focus_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_normal_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.eps +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google/web/vector/btn_google_light_pressed_ios.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/google_drive_logo.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/indabom.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/mouser.png +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/img/octopart_blue.svg +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/js/jquery-3.4.1.min.js +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/js/jquery.ba-floatingscrollbar.min.js +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/js/jquery.treetable.js +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/static/bom/js/materialize.min.js +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/bom-action-btn.html +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/dashboard-menu.html +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/bom/nothing-to-see.html +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/templates/registration/login.html +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/third_party_apis/__init__.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/third_party_apis/test_apis.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/utils.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/validators.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/views/__init__.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/bom/wsgi.py +0 -0
- {django-bom-1.193 → django_bom-1.237}/django_bom.egg-info/dependency_links.txt +0 -0
- {django-bom-1.193 → django_bom-1.237}/django_bom.egg-info/top_level.txt +0 -0
- {django-bom-1.193 → django_bom-1.237}/setup.cfg +0 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: django-bom
|
|
3
|
+
Version: 1.237
|
|
4
|
+
Summary: A simple Django app to manage a bill of materials.
|
|
5
|
+
Author-email: Mike Kasparian <mpkasp@gmail.com>
|
|
6
|
+
License: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://www.indabom.com/
|
|
8
|
+
Classifier: Environment :: Web Environment
|
|
9
|
+
Classifier: Framework :: Django
|
|
10
|
+
Classifier: Framework :: Django :: 5
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: Django<5.3,>=5.2
|
|
26
|
+
Requires-Dist: social-auth-app-django<6,>=5
|
|
27
|
+
Requires-Dist: social-auth-core<6,>=4
|
|
28
|
+
Requires-Dist: google-api-python-client>=2
|
|
29
|
+
Requires-Dist: django-materializecss-form
|
|
30
|
+
Requires-Dist: django-money<5,>=3
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# BOM
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
BOM is a simple Django app to manage a bill of materials. It supports multiple part numbering schemes, tracking component sourcing information, estimates costs, and contains smart integrations with Mouser to pull in the latest component pricing and Google Drive for part file management. BOM is written in Python 3 and Django 3.
|
|
37
|
+
|
|
38
|
+
[See a live example](https://www.indabom.com).
|
|
39
|
+
|
|
40
|
+
BOM can be added to an existing (or new) Django project, or stand alone on its own, which can be more convenient if you're interested in tweaking the tool.
|
|
41
|
+
|
|
42
|
+
If you already have a django project, you can skip to [Add Django Bom To Your App](#add-django-bom-to-your-app), otherwise [Start From Scratch: Add to new Django project](#start-from-scratch-add-to-a-new-django-project) to add it to a new django project, or [Start From Scratch: Use as standalone Django project](#start-from-scratch-use-as-a-standalone-django-project).
|
|
43
|
+
|
|
44
|
+
## Table of contents
|
|
45
|
+
* [Start From Scratch: Add to new Django project](#start-from-scratch-add-to-a-new-django-project)
|
|
46
|
+
* [Add Django Bom To Your App](#add-django-bom-to-your-app)
|
|
47
|
+
* [Start From Scratch: Use as standalone Django project](#start-from-scratch-use-as-a-standalone-django-project)
|
|
48
|
+
* [Customize Base Template](#customize-base-template)
|
|
49
|
+
* [Integrations](#integrations)
|
|
50
|
+
* [Contributing](#contributing)
|
|
51
|
+
* [Installation pitfalls](#installation-pitfalls)
|
|
52
|
+
|
|
53
|
+
## Start From Scratch: Add to a new Django project
|
|
54
|
+
1. To start from scratch, install your pipenv using Python 3.12
|
|
55
|
+
```
|
|
56
|
+
pipenv --python 3.12
|
|
57
|
+
pipenv shell
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
2. From here install django, and set up your project.
|
|
61
|
+
```
|
|
62
|
+
pipenv install django
|
|
63
|
+
django-admin startproject mysite
|
|
64
|
+
cd mysite
|
|
65
|
+
python manage.py migrate
|
|
66
|
+
python manage.py createsuperuser # make a user for your development environment
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. Continue on to [Add Django Bom To Your App](#add-django-bom-to-your-app).
|
|
70
|
+
|
|
71
|
+
## Add Django Bom To Your App
|
|
72
|
+
django-bom is a [reusable django application](https://docs.djangoproject.com/en/1.11/intro/reusable-apps/). If you don't already have a django project, you can follow some quick steps below to get up and running, or read about creating your first django app [here](https://docs.djangoproject.com/en/1.11/intro/tutorial01/).
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
pip install django-bom
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
1. Add "bom" to your INSTALLED_APPS setting like this::
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
INSTALLED_APPS = [
|
|
82
|
+
...
|
|
83
|
+
'bom',
|
|
84
|
+
'social_django', # to enable google drive sync in bom
|
|
85
|
+
'djmoney', # for currency
|
|
86
|
+
'djmoney.contrib.exchange', # for currency
|
|
87
|
+
'materializecssform',
|
|
88
|
+
]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
2. Update your URLconf in your project urls.py like this::
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
path('bom/', include('bom.urls')),
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
And don't forget to import include:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
from django.conf.urls import include
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
3. Update your settings.py to add the bom context processor `'bom.context_processors.bom_config',` to your TEMPLATES variable, and create a new empty dictionary BOM_CONFIG.
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
TEMPLATES = [
|
|
107
|
+
{
|
|
108
|
+
...
|
|
109
|
+
'OPTIONS': {
|
|
110
|
+
'context_processors': [
|
|
111
|
+
...
|
|
112
|
+
'bom.context_processors.bom_config',
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
and
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
BOM_CONFIG = {'standalone_mode': False}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
4. Run `python manage.py migrate` to create the bom models.
|
|
126
|
+
|
|
127
|
+
5. Start the development server `python manage.py runserver` and visit http://127.0.0.1:8000/admin/
|
|
128
|
+
to manage the bom (you'll need the Admin app enabled).
|
|
129
|
+
|
|
130
|
+
6. Visit http://127.0.0.1:8000/bom/ to begin.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Start From Scratch: Use as a standalone Django project
|
|
134
|
+
1. To start from scratch we recommend setting up a virtual environment
|
|
135
|
+
```
|
|
136
|
+
virtualenv -p python3 mysite
|
|
137
|
+
cd mysite
|
|
138
|
+
source bin/activate
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
2. From here install django, and set up your project.
|
|
142
|
+
```
|
|
143
|
+
git clone https://github.com/mpkasp/django-bom.git
|
|
144
|
+
pipenv install
|
|
145
|
+
python manage.py migrate
|
|
146
|
+
cp bom/local_settings.py.example bom/local_settings.py
|
|
147
|
+
python manage.py runserver
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Customize Base Template
|
|
151
|
+
The base template can be customized to your pleasing. Just add the following configuration to your settings.py:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
BOM_CONFIG = {
|
|
155
|
+
'base_template': 'base.html',
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
where `base.html` is your base template.
|
|
160
|
+
|
|
161
|
+
## Integrations
|
|
162
|
+
### Mouser Integration
|
|
163
|
+
For part matching, make sure to add your Mouser api key. You can get your key [here](https://www.mouser.com/MyMouser/MouserSearchApplication.aspx).
|
|
164
|
+
|
|
165
|
+
### Google Drive Integration
|
|
166
|
+
Make sure to add the following to your settings.py:
|
|
167
|
+
```
|
|
168
|
+
AUTHENTICATION_BACKENDS = (
|
|
169
|
+
'social_core.backends.google.GoogleOpenId',
|
|
170
|
+
'social_core.backends.google.GoogleOAuth2',
|
|
171
|
+
'social_core.backends.google.GoogleOAuth',
|
|
172
|
+
'django.contrib.auth.backends.ModelBackend',
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = ['email', 'profile', 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/plus.login']
|
|
176
|
+
SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS = {
|
|
177
|
+
'access_type': 'offline',
|
|
178
|
+
'approval_prompt': 'auto'
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
And if you're using https on production add:
|
|
182
|
+
```
|
|
183
|
+
SOCIAL_AUTH_REDIRECT_IS_HTTPS = not DEBUG
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### FIXER
|
|
187
|
+
Fixer.io is used to handle exchange rate calculations. This is helpful if you may be purchasing parts from another currency (especially via Mouser) and you still need to estimate your part costs.
|
|
188
|
+
|
|
189
|
+
To set this up you just need to add your API key to local_settings.py as shown in the example.
|
|
190
|
+
|
|
191
|
+
To update rates, migrate and run `python manage.py update_rates`. Some day we will need to add a (celerybeat?) task to update rates on a schedule. Explained more [here](https://github.com/django-money/django-money#working-with-exchange-rates).
|
|
192
|
+
|
|
193
|
+
## Contributing
|
|
194
|
+
|
|
195
|
+
Contributions welcome! Before contributing your work please read the [contributing readme](https://github.com/mpkasp/django-bom/blob/master/CONTRIBUTING.md).
|
|
196
|
+
|
|
197
|
+
Also reach out to mike@indabom.com to discuss features, and join our slack channel.
|
|
198
|
+
|
|
199
|
+
## Installation Pitfalls
|
|
200
|
+
|
|
201
|
+
### Windows
|
|
202
|
+
#### Sqlite
|
|
203
|
+
You may get an error during your `pip install -r requirements.txt` related to sqlite. This may be fixed by installing Visual C++ for python...
|
|
204
|
+
|
|
205
|
+
#### Cryptography
|
|
206
|
+
Sometimes you'll have issues installing cryptography, if this is the case you may just need to set up some environment variables. This [stackoverflow](https://stackoverflow.com/questions/46288737/error-while-installing-sqlite-using-pip-on-python-2-7-13) may help.
|
|
@@ -19,16 +19,15 @@ If you already have a django project, you can skip to [Add Django Bom To Your Ap
|
|
|
19
19
|
* [Installation pitfalls](#installation-pitfalls)
|
|
20
20
|
|
|
21
21
|
## Start From Scratch: Add to a new Django project
|
|
22
|
-
1. To start from scratch
|
|
22
|
+
1. To start from scratch, install your pipenv using Python 3.12
|
|
23
23
|
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
source bin/activate
|
|
24
|
+
pipenv --python 3.12
|
|
25
|
+
pipenv shell
|
|
27
26
|
```
|
|
28
27
|
|
|
29
28
|
2. From here install django, and set up your project.
|
|
30
29
|
```
|
|
31
|
-
|
|
30
|
+
pipenv install django
|
|
32
31
|
django-admin startproject mysite
|
|
33
32
|
cd mysite
|
|
34
33
|
python manage.py migrate
|
|
@@ -38,7 +37,7 @@ python manage.py createsuperuser # make a user for your development environment
|
|
|
38
37
|
3. Continue on to [Add Django Bom To Your App](#add-django-bom-to-your-app).
|
|
39
38
|
|
|
40
39
|
## Add Django Bom To Your App
|
|
41
|
-
django-bom is a [reusable django application](https://docs.djangoproject.com/en/1.11/intro/reusable-apps/). If you don't already have a django project, you can follow some quick steps below to get up and running, or read about creating your first django app [here](https://docs.djangoproject.com/en/1.11/intro/tutorial01/).
|
|
40
|
+
django-bom is a [reusable django application](https://docs.djangoproject.com/en/1.11/intro/reusable-apps/). If you don't already have a django project, you can follow some quick steps below to get up and running, or read about creating your first django app [here](https://docs.djangoproject.com/en/1.11/intro/tutorial01/).
|
|
42
41
|
|
|
43
42
|
```
|
|
44
43
|
pip install django-bom
|
|
@@ -88,7 +87,7 @@ TEMPLATES = [
|
|
|
88
87
|
and
|
|
89
88
|
|
|
90
89
|
```
|
|
91
|
-
BOM_CONFIG = {}
|
|
90
|
+
BOM_CONFIG = {'standalone_mode': False}
|
|
92
91
|
```
|
|
93
92
|
|
|
94
93
|
4. Run `python manage.py migrate` to create the bom models.
|
|
@@ -110,7 +109,7 @@ source bin/activate
|
|
|
110
109
|
2. From here install django, and set up your project.
|
|
111
110
|
```
|
|
112
111
|
git clone https://github.com/mpkasp/django-bom.git
|
|
113
|
-
|
|
112
|
+
pipenv install
|
|
114
113
|
python manage.py migrate
|
|
115
114
|
cp bom/local_settings.py.example bom/local_settings.py
|
|
116
115
|
python manage.py runserver
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
from django.contrib import admin
|
|
2
|
+
from django.contrib.auth import get_user_model
|
|
2
3
|
from django.contrib.auth.admin import UserAdmin
|
|
3
|
-
from .models import *
|
|
4
4
|
|
|
5
|
+
from .models import (
|
|
6
|
+
Assembly,
|
|
7
|
+
Manufacturer,
|
|
8
|
+
ManufacturerPart,
|
|
9
|
+
Organization,
|
|
10
|
+
Part,
|
|
11
|
+
PartClass,
|
|
12
|
+
PartRevision,
|
|
13
|
+
Seller,
|
|
14
|
+
SellerPart,
|
|
15
|
+
Subpart,
|
|
16
|
+
UserMeta,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
User = get_user_model()
|
|
5
21
|
|
|
6
22
|
class UserMetaInline(admin.TabularInline):
|
|
7
23
|
model = UserMeta
|
|
@@ -36,6 +52,7 @@ class SellerPartAdmin(admin.ModelAdmin):
|
|
|
36
52
|
list_display = (
|
|
37
53
|
'manufacturer_part',
|
|
38
54
|
'seller',
|
|
55
|
+
'seller_part_number',
|
|
39
56
|
'minimum_order_quantity',
|
|
40
57
|
'minimum_pack_quantity',
|
|
41
58
|
'unit_cost',
|
|
@@ -125,7 +142,11 @@ class AssemblyAdmin(admin.ModelAdmin):
|
|
|
125
142
|
]
|
|
126
143
|
|
|
127
144
|
|
|
128
|
-
|
|
145
|
+
# Try to unregister User model
|
|
146
|
+
try:
|
|
147
|
+
admin.site.unregister(User)
|
|
148
|
+
except admin.sites.NotRegistered:
|
|
149
|
+
pass
|
|
129
150
|
|
|
130
151
|
admin.site.register(User, UserAdmin)
|
|
131
152
|
admin.site.register(Organization, OrganizationAdmin)
|
|
@@ -39,6 +39,7 @@ VALUE_UNITS = (
|
|
|
39
39
|
('Ohms', '\u03A9'),
|
|
40
40
|
('mOhms', 'm\u03A9'),
|
|
41
41
|
('kOhms', 'k\u03A9'),
|
|
42
|
+
('MOhms', 'M\u03A9'),
|
|
42
43
|
('F', 'F'),
|
|
43
44
|
('pF', 'pF'),
|
|
44
45
|
('nF', 'nF'),
|
|
@@ -52,6 +53,7 @@ VALUE_UNITS = (
|
|
|
52
53
|
('C', '\u00B0C'),
|
|
53
54
|
('F', '\u00B0F'),
|
|
54
55
|
('H', 'H'),
|
|
56
|
+
('nH', 'nH'),
|
|
55
57
|
('mH', 'mH'),
|
|
56
58
|
('uH', '\u03BCH'),
|
|
57
59
|
('Hz', 'Hz'),
|
|
@@ -90,6 +92,8 @@ PACKAGE_TYPES = (
|
|
|
90
92
|
('QFT', 'QFT'),
|
|
91
93
|
('PLCC', 'PLCC'),
|
|
92
94
|
('VGA', 'VGA'),
|
|
95
|
+
('BGA', 'BGA'),
|
|
96
|
+
('CSP', 'CSP'),
|
|
93
97
|
('Other', 'Other'),
|
|
94
98
|
)
|
|
95
99
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from abc import ABC
|
|
2
|
+
|
|
2
3
|
from .utils import get_from_dict
|
|
3
4
|
|
|
4
5
|
|
|
@@ -143,6 +144,13 @@ class CSVHeaders(ABC):
|
|
|
143
144
|
c = evaluate(headers, operand, operator, c, i + 1 == num_asserts)
|
|
144
145
|
i += 2
|
|
145
146
|
|
|
147
|
+
def validate_header_in(self, headers, header):
|
|
148
|
+
header_synonyms = self.get_synoynms(header)
|
|
149
|
+
for hs in header_synonyms:
|
|
150
|
+
if hs in headers:
|
|
151
|
+
return True
|
|
152
|
+
raise CSVHeaderError(f'Missing column named {header}')
|
|
153
|
+
|
|
146
154
|
|
|
147
155
|
#
|
|
148
156
|
# For each CSV header class, a static data member dictionary uses the key as the default name for the header while the
|
|
@@ -164,9 +172,12 @@ class ManufacturerPartCSVHeaders(CSVHeaders):
|
|
|
164
172
|
class SellerPartCSVHeaders(CSVHeaders):
|
|
165
173
|
all_headers_defns = [
|
|
166
174
|
CSVHeader('seller', name_options=['part_seller', 'part_seller_name', ]),
|
|
167
|
-
CSVHeader('
|
|
168
|
-
CSVHeader('
|
|
169
|
-
CSVHeader('
|
|
175
|
+
CSVHeader('seller_part_number', name_options=['seller_pn', 'spn', 'pn', 'part_seller_part_number', 'seller_part_number', ]),
|
|
176
|
+
CSVHeader('unit_cost', name_options=['seller_part_unit_cost', 'unit_cost', 'part_cost', ]),
|
|
177
|
+
CSVHeader('minimum_order_quantity', name_options=['minimum_order_quantity', 'moq', 'part_moq', ]),
|
|
178
|
+
CSVHeader('nre_cost', name_options=['part_nre', 'part_nre_cost', 'nre', 'nre_cost', ]),
|
|
179
|
+
CSVHeader('minimum_pack_quantity', name_options=['minimum_pack_quantity', 'mpq', 'part_mpq' ]),
|
|
180
|
+
CSVHeader('lead_time_days', name_options=['lead_time_days', 'lead_time', 'lt']),
|
|
170
181
|
]
|
|
171
182
|
|
|
172
183
|
|
|
@@ -223,7 +234,8 @@ class PartsListCSVHeaders(CSVHeaders):
|
|
|
223
234
|
CSVHeader('manufacturer_part_number', name_options=['mpn', 'mfg_part_number', 'part_manufacturer_part_number', 'mfg part number', 'manufacturer part number']),
|
|
224
235
|
CSVHeader('part_number', name_options=['part number', 'part no', ]),
|
|
225
236
|
CSVHeader('revision', name_options=['rev', 'part_revision', ]),
|
|
226
|
-
] + part_attributes
|
|
237
|
+
] + part_attributes \
|
|
238
|
+
+ SellerPartCSVHeaders.all_headers_defns
|
|
227
239
|
|
|
228
240
|
|
|
229
241
|
class PartsListCSVHeadersSemiIntelligent(PartsListCSVHeaders):
|
|
@@ -234,17 +246,19 @@ class PartsListCSVHeadersSemiIntelligent(PartsListCSVHeaders):
|
|
|
234
246
|
CSVHeader('part_class', name_options=['class', 'part_category']),
|
|
235
247
|
CSVHeader('part_number', name_options=['part number', 'part no', ]),
|
|
236
248
|
CSVHeader('revision', name_options=['rev', 'part_revision', ]),
|
|
237
|
-
] + PartsListCSVHeaders.part_attributes
|
|
249
|
+
] + PartsListCSVHeaders.part_attributes \
|
|
250
|
+
+ SellerPartCSVHeaders.all_headers_defns
|
|
238
251
|
|
|
239
252
|
|
|
240
253
|
class BOMFlatCSVHeaders(CSVHeaders):
|
|
241
254
|
all_headers_defns = [
|
|
242
255
|
CSVHeader('part_number', name_options=['part number', 'part no', ]),
|
|
243
|
-
CSVHeader('quantity', name_options=['count', 'qty', ]),
|
|
256
|
+
CSVHeader('quantity', name_options=['count', 'qty', 'quantity', ]),
|
|
244
257
|
CSVHeader('do_not_load', name_options=['dnl', 'dnp', 'do_not_populate', 'do_not_load', 'do not load', 'do not populate', ]),
|
|
245
258
|
CSVHeader('part_class', name_options=['class', 'part_category']),
|
|
246
259
|
CSVHeader('references', name_options=['designator', 'designators', 'reference', ]),
|
|
247
260
|
CSVHeader('synopsis', name_options=['part_synopsis', ]),
|
|
261
|
+
CSVHeader('description', name_options=['part_description', 'desc', ]),
|
|
248
262
|
CSVHeader('revision', name_options=['rev', 'part_revision', 'rev.']),
|
|
249
263
|
] + ManufacturerPartCSVHeaders.all_headers_defns \
|
|
250
264
|
+ SellerPartCSVHeaders.all_headers_defns + [
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from django.contrib import messages
|
|
2
|
+
from django.core.exceptions import PermissionDenied
|
|
3
|
+
from django.http import HttpResponseRedirect
|
|
4
|
+
from django.urls import reverse
|
|
5
|
+
|
|
6
|
+
from social_django.models import UserSocialAuth
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def google_authenticated(function):
|
|
10
|
+
def wrap(request, *args, **kwargs):
|
|
11
|
+
user = request.user
|
|
12
|
+
try:
|
|
13
|
+
user.social_auth.get(provider='google-oauth2')
|
|
14
|
+
return function(request, *args, **kwargs)
|
|
15
|
+
except UserSocialAuth.DoesNotExist as e:
|
|
16
|
+
messages.error(request, "You must Sign in with Google to access this feature.")
|
|
17
|
+
return HttpResponseRedirect(reverse('bom:settings', kwargs={'tab_anchor': 'organization'}))
|
|
18
|
+
|
|
19
|
+
wrap.__doc__ = function.__doc__
|
|
20
|
+
wrap.__name__ = function.__name__
|
|
21
|
+
return wrap
|
|
22
|
+
|
|
23
|
+
def organization_admin(function):
|
|
24
|
+
def wrap(request, *args, **kwargs):
|
|
25
|
+
if request.user.bom_profile().role != 'A':
|
|
26
|
+
messages.error(request, "You don't have permission to perform this action.")
|
|
27
|
+
return HttpResponseRedirect(request.META.get('HTTP_REFERER'), reverse('bom:home'))
|
|
28
|
+
return function(request, *args, **kwargs)
|
|
29
|
+
|
|
30
|
+
wrap.__doc__ = function.__doc__
|
|
31
|
+
wrap.__name__ = function.__name__
|
|
32
|
+
return wrap
|