* remove docker-sqlite file
- Do not want to encourage use of sqlite
* Add Caddyfile
* Add default site URL to .env
- Matches Caddyfile
* Cleanup / simplify .env file
* Remove dev nginx conf file
* Further cleanup of .env file
* Update docker-compose.yml
- Use caddy image instead of nginx as proxy
* Set max body size
* gunicorn: enable external logging
* Update file structure
* Cleanup docker-compose file
* Update docker/docker-compose.yml
Co-authored-by: Matthias Mair <code@mjmair.com>
* Update docker/Caddyfile
Co-authored-by: Matthias Mair <code@mjmair.com>
* Fix for postgresql packages
- Need postgresql13-client to be installed, it contains pg_dump
- Without this, backup / restore *does not work*
* Create static_i18n dir if it does not exist
* Reduce output from collectstatic
* Revert gunicorn logging
- Want to see the logs in docker
* Fix trailing slash
Ref: https://github.com/inventree/InvenTree/pull/6551#issuecomment-1962423765
* tasks.py - pass 'nouv' option through
* Update package requirements:
- Allow installation of rapidfuzz without building
* Install uv as part of docker image
* Add environment variable to control downstream URL
* Do not use uv package manager by default
- Currently does not work "correctly" - ignores installed packages
- Requires further work to run reliably
* Fix docker-compose file
- Do not build locally
* Cleanup gunicorn file
- Remove unused lien
* Cleanup docker-compose.yml
- Simpler volume management
* Update Caddyfile
Add newline
* Update requirements.txt
Add newline
* Update tasks.py
Add missing blank line
* Simplify Caddyfile
* Adds option for customizing web port
* cleanup docker-compose.yml
- Better mapping of caddy data
- Cleaner volume setup
* Add django version template
- Ensure all docs links point to the current django version we are using
* docs: cleanup intro.md
* Cleanup serving_files.md
* Cleanup config.md
* docker install docs updates
* Enable code block copying
* Fix include file
* Fix link
* Update docker install docs
* Update docker.md
* Add info about demo dataset
* Tweak heading
* Update docs link checks
* Fix workflow
* Another fix
* More ignore pattearns
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* bump to dj >4.2
* switch to experimental git release
* bump django-import_export
* bump mptt
* replace is_ajax, which was removed
https://docs.djangoproject.com/en/3.1/releases/3.1/#id2
* Save before accessing values in m2m/fk fields
* move plugin init
* use dev version of django for fix
* update deps
* fix deps
* use django smaller 4.2
* fix reqs
* fix merge
* remove moved code
* another merge fix
* fix ajax call
* fix refs
* change python min v
* fix deps
* bump deps
* fix deps
* pin pillow
* dj 4.1 upgrades
* make diff smaller
* bump all deps
* drop down to py3.9
* bump versions
* merge fix
* fix diff
* more bumping
* diff cleanup
* bump deps
* fix reqs
* use accurate state for model migrations
using apps the historically correct state is used
* try import
* added more logs
* add try here too
* clean up rebuilds
* Dj 4.2 (#161)
* autochanges
* bump
* fix diff
* fix diff
* bump deps
* fix req
* remove select_related to test error influence
* switch to mptt fork
* fix reqs for upstream
* move tracking ensureance into save
* optimize check frequency
* use psycopg instead of psycopg2
* fix header
* just use the values
* switch to dj < 4.2
* fix req
* another req fix
* switch to 4.2 again
* fix merge error
* Check for null pk in calculate_total_price
Cannot access self.lines if pk is Null
* use patched mptt
* try psycopg2 again
* Remove tree rebuild from migrations
* Prevent notify_users if importing or migrating
* Add order_by() to subquery annotations
- Ref: https://stackoverflow.com/a/629691
* Update stock filters
- Append order_by()
* fix error if running without timezones in testing
* add logging to figure this out
* remove tz from self.creation if TZ is off
* add tz?
* move around?
* only run the test i am trying to figure out
not reproducible on my machine
* only run the test i am trying to figure out
not reproducible on my machine
* run all tests again
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Patch for django-allauth 0.55.0
- Some breaking changes here
- Add logger error if auth provider cannot be imported
- Fix for API endpoints
* Only provide URLs for configured plugins
* Update for django-allauth 0.56.0
- Remove support for keycloak
- Remove example from configuration template
* Update django-allauth in requirements.txt
* Update requirements.in
* Refactor SSO functions into common file
* Update config template file
* Update docs
* Fix template files
* Log SSO exceptions to the database
- WIll help greatly with debugging installs
* Add note about error handling in docs
* Replace moneyed format_money function
* Update django-money to 3.3.0 and py-moneyed to 3.0
* Add CurrencyField migrations
* Fix checking if decimal_places is set
* Add currency formatting test
* Test fixing deepsource test patterns
* Revert "Test fixing deepsource test patterns"
This reverts commit 398ef93cd6.
* FIx requirements.txt formatting
* Revert "FIx requirements.txt formatting"
This reverts commit bb554b0758.
* Add dj-rest-auth
[FR] User registration via API
Fixes#3978
* add jwt support for API
* check for old password
* Add check if registration is allowed
* make email mandatory if selected
* lower postgres version?
* update req
* revert psql change
* move form options out
* Update reqs
* Add handlers for most OAuth2
* refactor and add logging
* make error message more actionable
* add handler for twitter
* add keycloak endpoint
* warning for legacy apps
* remove legacy twitter support
* rename file
* move url to sub
* make JWT optional (default off)
* Add var to config template
* Add API endpoint to list available providers
* fix url pattern
* make currency choices independend
* Remove check for field, just try to get rid of it
* Add IF EXISTS to avoid error (works in postgres)
* Look for operational error, not programming error
* Use variants, depending on errors caused
* [FR] Add Feature flags
Fixes#4965
* Add option to define custom flags
* Revert "make currency choices independend"
This reverts commit ab84a7ff83.
* try fixing mysql
* more safeguards
* fix executioner call
* a fck
* use migrations. syntax
* and another round for mysql
* revert print change
* use UTC for datetime
* Update part.migrations.0112
- Add custom migration class which handles errors
* Add unit test for migration
- Ensure that the new fields are added to the model
* Update reference to PR
* fix ruleset for missing_models
* fix ruleset for flags_flagstate
* add API endpoints for flags
* add tests for new API endpoints
* fix tests
* fix merge
* fix tests
---------
Co-authored-by: martin <martin@iggland.com>
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* Add info for installer, branch, publisher
* include version info
* fix permissions
* fix typo
* add more info
* use GH url
* fix node
* remove publisher
* remove more logging
* Add info to version view
* enable branch discovery when not set
* fix ref to github version
* add branch to about dialog
* use precise plattform information - if no env is set
* fix ref names
* load VERSION info
* rename plattform to target
* extend installer var
* add generic plattform info
* add docs for version info
* add more info
* add installer codes
* Ammend navigation
* adds new field 'parameter type' to PartParameterTemplate model
* Move part parameter settings onto their own page
* Add "choices" and "regex" template types
* Adds validation for PartParameter based on template type
* javascript cleanup
* Fix for serializers.py
* Add unit testing for parameter validation
* Add filters
* Rename "type" field to "param_type"
- Should have seen that one coming
* Coerce 'boolean' value to True/False
* table update
* js linting
* Add requirement for "pint" package
* Add validator for physical unit types
- Revert a previous migration which adds "parameter type" and "validator" fields
- These will get implemented later, too much scope creep for this PR
- Add unit test for validation of "units" field
* Update PartParameter model
- Add data_numeric field (will be used later)
- Add MinLengthValidator to data field
* Run validation for part parameter data
- Ensure it can be converted to internal units
* Update admin interface to display partparameter values inline for a part
* Adds validation of part parameter data value
- Also converts to base units, and stores as "numeric" value
- Display "numeric" value in tables
- Create new file conversion.py for data conversion
* Update unit tests and fix some bugs
* Update docstring
* Add units to parameter columns in parameteric part table
* Allow part list to be ordered by a particular parameter value
- Annotate queryset with new "order_by_parameter" method
- Skeleton method for future work
* Bump API version
* Adds unit testing for sorting parts by parameter value
* Update historical data migrations
- Turns out RunPython.noop is a thing?
* Cache the unit registry
- Creating the unit registry takes a significant amount of time
- Construct when first called, and then cache for subsequent hits
- Massive improvement in performance
* Throw error on empty values when converting between units
* Data migration for converting existing part parameter values
* Handle more error cases
* Show parameteric table on top-level part page too
* Unit test for data migration
* Update credits in docs
* Improved error checking
* WIP docs updates
* Fix parameteric table filtering
* remove zoom property
* Fix for import path
* Update parameter docs
* Run background task to rebuild parameters when template changes
* Make "data_numeric" field nullable
- Defaulting to zero is not appropriate, as the actual value may be zero
- Sorting still seems to work just fine
* Fixes for unit test
* More unit test fixes
* Further fixes for unit tests
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* 'Tag' management
Fixes#83
* Add for ManufacturerPart, SupplierPart
* Add tags for StockLocation, StockItem
* fix serializer definition
* add migrations
* update pre-commit
* bump dependencies
* revert updates
* set version for bugbear
* remove bugbear
* readd bugbear remove isort
* and remove bugbear again
* remove bugbear
* make tag fields not required
* add ruleset
* Merge migrations
* fix migrations
* add unittest for detail
* test tag add
* order api
* reduce database access
* add tag modification test
* use overriden serializer to ensuer the manager is always available
* fix typo
* fix serializer
* increae query thershold by 1
* move tag serializer
* fix migrations
* content_types are changing between tests - removing them
* remove unneeded fixture
* Add basic docs
* bump API version
* add api access to the docs
* add python code
* Add tags to search and filters for all models
* [FR] Update to OpenAPI from CoreAPI
Fixes#3226
* factor request function out
* add schema export task
* add api-docs
* add action to check if diff occured
* also wait for docstyle
* use full command
* add envs for inventree
* update inventree before running
* use relative path
* remove schema action
* remove tags to fit 3.0 parsers
* fix url base name for reloads
* revert change in plugin resolver
* remove unused tags
* add rapidoc too
* declare api regex
* fix as suggested by @martonmiklos in
https://github.com/inventree/InvenTree/pull/4178#discussion_r1167279443
* set inventree logo
* remove Rapidoc
* Update required cryptography library version
* remove old env variable from dockerfile
- Was required when we based on alpine linux
- now we use python_slim
* Fix file contents
* Basic implementation of iCal feed
* Add calendar download to API
* Improve comments, remove unused outputs
* Basic implementation of iCal feed
* Add calendar download to API
* Improve comments, remove unused outputs
* Improve comment
* Implement filter include_completed
* update requirements.txt with pip-compile --output-file=requirements.txt requirements.in -U
* Fix less than filter
* Change URL to include calendar.ics
* Fix filtering of orders
* Remove URL/functions for calendar in views
* Lint
* More lint
* Even more style fixes
* Updated requirements-dev.txt because of style fail
* Now?
* Fine, fix it manually
* Gaaah
* Fix with same method as in common/settings.py
* Fix setting name; improve name of calendar endpoint
* Adapt InvenTreeAPITester get function to match post, etc (required for calendar test)
* Merge
* Reduce requirements.txt
* Update requirements-dev.txt
* Update tests
* Set expected codes in API calendar test
* SO completion can not work without line items; set a target date on existing orders instead
* Correct method to PATCH
* Well that didn't work for some reason.. try with cancelled orders instead
* Make sure there are more completed orders than other orders in test
* Correct wrong variable
* Lint
* Use correct status code
* Add test for unauthorized access to calendar
* Add a working test for unauthorised access
* Put the correct test in place, fix Lint
* Revert changes to requirements-dev, which appear magically...
* Lint
* Add test for basic auth
* make sample simpler
* Increment API version
Co-authored-by: Matthias Mair <code@mjmair.com>
* add model for feed entries
* add task to update feed entries
* Add API routes
* Fix name in model
* rename model
* fix read endpoint
* reduce duplication in NewsFeed API endpoints
* reduce duplicated code
* add ui elements to index
* add missing migrations
* add ressource route
* add new model to admin
* reorder fields
* format timestamp
* make title linked
* reduce migrations to 1
* fix merge
* fix js style
* add model to ruleset
* Remove control and non-printable characters from form fields (server side)
* Update regex to properly filter out control characters only
* Add regex lib to requirements flie
* Fix regex in javascript (client side)
* add required unicode flag
* Pin weasyprint version
- Revert to 54.3
- Fixes https://github.com/inventree/InvenTree/issues/3528
* Simplify label printing for multiple pages
* Simplify PDF generation for multiple report outputs
* Add content wrapper div for base label template
- Allows more extensibility
* Include cargo / rustc in the docker image
- Otherwise cryptography library seems to fail
* Revert cryptography lib to older version
- New version requires rust, adds ~300MB to the image size!
* Pin django-stdimage to sub 6.0.0
- 6.0.0 breaks model serialization for background worker task
- NFI why it does this
* Fix requirements file
* remove windows deps. and append requirements
* Add unit tests for encoding and offloading tasks
Co-authored-by: Matthias <code@mjmair.com>
* Remove stat context variables
* Revert "Remove stat context variables"
This reverts commit 0989c308d0.
* remove old backport
* move requirements
* move isort
* move migrations-tests
* add pip-tools as req and add hook
* Use hashes and also run when txt files are added
* Update to hashes in requirements
* update requirements install path
* remove allauth-2fa for a test
* install dev-requirements
* re-enable allauth
* remove hashes from pre normal setup
* Remove version bindings if they are the laest
* move depencies to upper bound
* fix django-money
* remove windows specific requirements
* also install dependencies
* update markdownify
* remove django-admin-shell
* remove unneeded packages
* add docs
* remove pins and fix pre-commit pipeline
* pin django-money
* really remove admin shell
* return default behaviour for money serializer
* pip fix
* update filter name
* set decimal for output
* add migrations
* pin coveralls
* update requirements
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>