Commit Graph

540 Commits

Author SHA1 Message Date
d0c6449c39 # 88 Additional biotope codes
* adds codelist 975 to project
* adds new form field for adding extra biotope information
2022-01-31 10:52:35 +01:00
af75ff5885 Merge pull request '# 89 Ecoaccount recorded state reset (fix)' (#94) from 89_Ecoaccount_recorded_state_reset into master
Reviewed-on: SGD-Nord/konova#94
2022-01-31 10:18:46 +01:00
8979149e56 # 89 Ecoaccount recorded state reset (fix)
* fixes bug where recorded state of eco account has been reset, if a deduction is created from the detail view of the ecoaccount itself
2022-01-31 10:14:46 +01:00
b55605155a Merge pull request '# 71 Shortcut buttons enhanced' (#92) from 71_Shortcut_buttons_link into master
Reviewed-on: SGD-Nord/konova#92
2022-01-31 08:08:17 +01:00
4452405b15 # 71 Shortcut buttons enhanced
* adds bootstrap class to prevent link style rendering
* reorganizes templates for home view into separate quickstart templates
2022-01-31 08:06:41 +01:00
1235fc28b6 # HOTFIX
* fixes bug where errors occured once an email shall be sent. See issue #87 for details
2022-01-28 17:01:45 +01:00
81f2724f3f Merge branch 'master' into Docker
# Conflicts:
#	konova/sub_settings/django_settings.py
2022-01-28 16:41:21 +01:00
9c338f8a90 Merge pull request '31_API' (#90) from 31_API into master
Reviewed-on: SGD-Nord/konova#90
2022-01-28 16:38:10 +01:00
5b52119e89 #31 API further credential
* adds Kspuser as another expected header data to resolve the api user
* adds/updates translations
2022-01-28 16:35:25 +01:00
cbf871f4b4 #31 API Deductions Tests
* adds tests for deduction API
2022-01-28 16:21:23 +01:00
9b18b877d5 #31 API Deductions
* adds intervention check state reset to all deduction-changing API routes
2022-01-28 15:55:00 +01:00
c3a8631f03 #31 API Deductions
* adds GET/POST/PUT/DELETE support for EcoAccountDeductions
2022-01-28 15:44:09 +01:00
5dc1b11ca1 #31 API PUT Tests
* adds tests for PUT method in api
2022-01-28 13:31:44 +01:00
24b8c12505 #31 API GET Tests
* adds tests for api GET method
* fixes bug where non existing geometry could not be serialized properly
2022-01-28 12:30:09 +01:00
df309c6124 #31 API protected visibility
* reworks most internal API methods for de/serializing from public to protected visibility
* moves test_api_sharing.py into /share subfolder of tests
2022-01-28 09:44:16 +01:00
a7890948b7 #31 API DELETE Tests
* adds tests for DELETE method of all major data types
2022-01-28 09:24:14 +01:00
a47d4e8416 #31 API DELETE
* adds support for DELETE method for all relevant objects
* improves get_obj_from_db functionality
* drops custom compensation logic for get_obj_from_db due to improvement of base method
2022-01-28 08:52:11 +01:00
80896731a8 #31 API Tests
* adds creation tests with minimum data for intervention, compensation, ema and ecoaccount
* fixes bug where empty geometry would not be created properly using the API
* reworks key fetching from POST data, so inproperly stated keys will lead to an error for the API user, instead of silently working and use default data
* adds some logical checks for deductable_surface of eco account creation using api
* fixes bug that would have occured on creating compensations via api
2022-01-27 17:09:38 +01:00
ea29aa7d6b #31 API Tests
* moves setupTestData in BaseAPITestCase class
2022-01-27 15:32:31 +01:00
1b0ab1be07 #31 API Tests
* writes test for sharing using the API
* fixes bug on frontend form where an exception occured on generating a new API token if no token existed, yet
* adds permission constraint (default group) for using the api in general
* fixes default-group-only behaviour for sharing-API, so users can only add new users and not removing them, as long as they do not have any other group membership like registration or conservation office
* changes 'ksptoken' to 'Ksptoken' to match CGI standard for http header keys
2022-01-27 14:48:42 +01:00
6deff28389 #31 API Token mail
* sends an email to the support address if a new token has been generated
2022-01-27 11:47:27 +01:00
c9bccec1a5 #31 API Frontend token generating
* adds frontend settings for users to create API tokens on their user settings
2022-01-27 11:37:38 +01:00
fc0cd2f086 #31 API Share
* adds support for GET and PUT of sharing users for all data types (compensation is shared via intervention)
2022-01-26 09:16:37 +01:00
0b723b1529 #31 API WIP
* adds support for GET /check on intervention to run checks automatically via API
2022-01-25 09:29:14 +01:00
096688fad5 #31 API PUT/POST EcoAccount
* adds support for PUT and POST of EcoAccount API
2022-01-24 16:56:06 +01:00
047e4fb5cd #31 API PUT/POST Ema
* adds support for PUT and POST of Ema
* moves set_responsibility() and set_legal() from Intervention API Serializer into proper Mixins where they belong to
2022-01-24 16:43:37 +01:00
9da5df2d5b #31 API Improvement
* adds support for returning all shared data
* adds documentation
2022-01-24 16:23:38 +01:00
fa6603f218 #31 API PUT Compensation
* adds support for PUT compensation (Update)
* improves updating of related objects
* adds missing payment PUT support for intervention API
2022-01-24 15:56:02 +01:00
59c5caf8ac #31 API code cleaning
* splits large AbstractModelAPISerializer into different reusable Mixins to increase reusability of code for similar models
2022-01-24 15:20:23 +01:00
b3b9bfca09 #31 API POST Compensation
* adds documentations
* adds check for valid deadline type
2022-01-24 15:04:20 +01:00
08ab36ffda #31 API POST Compensation
* adds initialize_objects to an abstractmethod of the super class to be implemented in subclasses
* differentiates error messages if intervention does not exist or is just not shared with the user
2022-01-24 14:51:50 +01:00
fa01733815 #31 API POST Compensation
* adds support for POST of new compensations
* adds shared_users property to BaseObject and Compensation to simplify fetching of shared users (Compensation inherits from intervention)
* extends compensation admin index
* modifies compensation manager which led to invisibility of deleted entries in the admin backend
* fixes bug in sanitize_db.py where CREATED useractions would be removed if they are not found on any log but still are used on the .created attribute of the objects
2022-01-24 14:41:56 +01:00
5ad1b35dc0 #31 API basic implementation Cleanup
* cleans code
* reworks many code fragments into smaller methods and split into super class
2022-01-24 13:12:29 +01:00
b1a42b126e #31 API POST/PUT Intervention
* splits code in smaller, reusable methods
* adds put method to view
* adds update_model_from_json() method
2022-01-24 13:04:39 +01:00
854e358b73 #31 API POST Intervention
* adds check for deserializing of konova codes
2022-01-24 12:50:28 +01:00
a03f9c8c78 #31 API POST Intervention
* adds support for proper POST of intervention
* makes /<id> optional (required for Post)
2022-01-24 12:17:17 +01:00
a06eaa49fb #31 API basic implementation Refactor
* reorganizes code into proper api/utils/serializer subclasses to keep serialization logic away from regular view logic
2022-01-24 10:31:48 +01:00
ee828598cc #31 API basic implementation Cleanup
* cleans code
* reworks many code fragments into smaller methods and split into super class
2022-01-21 18:34:01 +01:00
2db63b4f91 #31 API basic implementation Ema fetch
* adds API support for fetching EMA
2022-01-21 17:49:07 +01:00
beb67ba307 #31 API basic implementation EcoAccount fetch
* outsources json creation of modified_on an created_on to superclass
* adds API support for fetching ecoaccount data
2022-01-21 17:44:58 +01:00
fd4729aa03 #31 API basic implementation Compensation
* adds compensation fetching for API v1
* refactors filter into predefined lookup dict of super class (needs to be customized on subclasses)
2022-01-21 17:32:31 +01:00
11de423d05 #31 API basic implementation Intervention fetch
* enhances intervention fetching and serialization
2022-01-21 16:29:59 +01:00
cf82f4b223 #31 API basic implementation Token Authentication
* adds token checking to AbstractModelAPIView
* adds user accessibility filtering for intervention API v1
* extends fetch_and_serialize() method to take a dict for db filtering instead of a single field and value
* organizes urlnames into supporting formats like "api:v1:intervention"
2022-01-21 16:15:16 +01:00
134651c8f7 #31 API basic implementation
* adds new app to project
* adds relation between User model and new APIUserToken model
* adds first implementation for GET of intervention
* adds basic code layout for future extension by having new versions
2022-01-21 15:26:08 +01:00
d01bc7e547 Merge pull request 'master' (#85) from master into Docker
Reviewed-on: SGD-Nord/konova#85
2022-01-21 09:27:46 +01:00
d8b503f2b5 Merge pull request '83_Publication_rework' (#84) from 83_Publication_rework into master
Reviewed-on: SGD-Nord/konova#84
2022-01-21 09:27:10 +01:00
4e57ca4954 # 83 Publication rework
* adds fake-inherited is_ready_for_publish() method to compensation model (not derived from RecordableObjectMixin) to equalize usage of is_ready_for_publish() usage for all data types (compensation can be checked the same way as intervention, ecoaccount or ema)
2022-01-21 09:26:41 +01:00
469dabf6aa # 83 Publication rework EcoAccount Compensation
* adds implementation for is_ready_for_publish() on compensation (uses intervention's implementation) and EcoAccount
2022-01-21 09:22:43 +01:00
20ed6a7720 # 83 Publication rework EMA
* adds is_ready_for_publish implementation for EMA
2022-01-21 09:15:06 +01:00
884aaca0b3 # 83 Publication rework interventions
* adds abstract is_ready_for_publish method to PublishableObjectMixin which needs to be implemented in subclasses
* adds implementation for intervention model
* adds publishable check to rendering report view
* adds/updates translations
2022-01-21 09:02:56 +01:00