cdd484b0fd
Use remove_private_keys() instead of explicitly popping off certain keys
2019-04-18 17:12:22 +02:00
37791f4acf
Notifications regression: Notifications not created
...
Notifications for when someone posted a comment on your node
was not created.
Root cause was that default values defined in schema was not set,
resulting in activity subscriptions not being active.
There were 2 bugs preventing them to be set:
* The way the caching of markdown as html was implemented caused
default values not to be set.
* Eve/Cerberus regression causes nested default values to fail
https://github.com/pyeve/eve/issues/1174
Also, a 3rd bug caused nodes without a parent not to have a
subscription.
Migration scripts:
How markdown fields is cached has changed, and unused properties
of attachments has been removed.
./manage.py maintenance replace_pillar_node_type_schemas
Set the default values of activities-subscription
./manage.py maintenance fix_missing_activities_subscription_defaults
2019-02-19 14:16:28 +01:00
522356c4ff
Add support (and fix bug) for Python 3.7
2018-09-17 18:44:43 +02:00
57265fb846
Added support for datetime objects in API requests.
2017-12-27 11:27:43 +01:00
242d7fc7ce
Bumped version to 1.7 (but not yet released)
2017-09-19 13:44:04 +02:00
c8eec9fa9d
Added pickle support for Resource classes, albeit a bit hacky.
...
Unpickling requires the class to be known, so we can't simply use to_dict()
to pickle and pass the dict to __init__() to unpickle. This works for the
pickled object itself (as pickle restores its type), but fails to restore
the class of subobjects, such as some_node.picture. This is why the code
now pickles each subobject too.
2017-09-19 13:43:48 +02:00
cfcaf96ac6
Removed Resource.from_dict(), it was never used and is broken in Python 3.
2017-09-19 12:25:43 +02:00
3c3beea419
Removed some unsupported resource methods from Organizations
2017-08-31 13:45:39 +02:00
a177527e77
Project: made has_method() safe for when allowed_methods doesn't exist.
2017-06-01 09:51:10 +02:00
c5d0ae843f
Either raise or log, not both
2017-03-03 12:19:27 +01:00
ea33d69a8e
Switched to different datetime formatting in JSON.
...
We now use the same format as the Pillar API.
2016-11-07 10:55:49 +01:00
fe2c36328a
Use our PillarJSONEncoder for all API requests.
2016-11-07 10:41:38 +01:00
6d651bfeab
Bumped version to 1.6.1
2016-11-04 12:37:43 +01:00
aac4922376
Fix crash when project has no allowed_methods property
2016-10-27 09:29:49 +02:00
d2a24d4593
Fix crash when node has no allowed_methods property
2016-10-27 09:29:34 +02:00
d5d99ec355
Added class for Activity.
2016-10-12 14:30:05 +02:00
f4010bb561
Bumped version to 1.6.0
2016-10-04 16:26:23 +02:00
ae33fb64dc
Added Project.find_by_url(project_url) because it's so commonly used as ID
2016-09-20 12:35:42 +02:00
a3c87c27da
Always verify SSL connections.
...
Strangely enough, without verify=True we get:
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
2016-08-05 16:10:43 +02:00
66c9200f0c
Removed long-unused code
2016-08-05 16:09:33 +02:00
3c39506014
Allow PATCHing nodes.
2016-07-28 11:28:32 +02:00
50bc2e8311
Bumped to 1.5.0 (part 2)
2016-07-26 15:29:21 +02:00
654a7d4823
Don't gobble up the exceptions.BadRequest exception
2016-07-26 10:57:55 +02:00
011bfa9809
Prevented error when response doesn't have _items.
2016-07-21 16:34:52 +02:00
f47dcd2a31
Enable global HTTP headers to be sent with every request.
2016-07-20 14:27:45 +02:00
67bf7e0df5
Ensure projection of node permissions
2016-07-13 16:51:13 +02:00
50cefd49d4
Using HTTP OPTIONS call for Project.node_type_has_method()
2016-07-13 16:02:55 +02:00
1bcbd866ce
PEP8 formatting
2016-07-13 15:10:22 +02:00
283cd23bc1
Bumped version to 1.4.0
2016-07-13 11:05:08 +02:00
d33dbf9883
Added exception for 413 Request Entity Too Large
2016-07-08 12:31:40 +02:00
8565bf37b2
Use dict for HTTP status code → exception mapping.
2016-07-08 12:31:21 +02:00
d76fcfdeba
Node: removed 'theatre_link'
2016-07-07 16:59:23 +02:00
bd99972246
Put a dummy NodeType back (FOR NOW!)
2016-07-07 15:39:58 +02:00
b34d56d44e
Added Node.share() and Node.get_share_links() methods.
2016-07-07 15:18:26 +02:00
96ece1540d
Removed the obsolete NodeType class.
2016-07-07 15:04:46 +02:00
2e4c5b2663
Split Node.create_asset_from_file and added direct uploading from file obj
...
Node.create_asset_from_file() is split such that the actual file upload is
handled by File.upload_to_project(). This now also supports directly
uploading from a file object, which could be an io.BytesIO() object to
upload from RAM.
2016-07-07 11:08:30 +02:00
2989449b25
Actually use the 'extra_where' option.
2016-07-06 16:18:34 +02:00
d03cf7f73f
create_asset_from_file: added extra_where param to limit updatable nodes.
2016-07-05 17:28:19 +02:00
86b7358717
create_asset_from_file: allow parent_node_id=None
...
Also added more documentation.
2016-07-05 17:27:50 +02:00
8dfb0a193b
Added Node.create_asset_from_file() utility function
...
This also adds some unittests using the Responses library.
2016-07-05 16:47:51 +02:00
6ad9b5f7bd
Ported utils.remove_private_keys() from Pillar
2016-07-05 16:30:34 +02:00
2a86abe66e
Datetimes are now returned as timezone-aware.
...
Timezone is hardcoded as UTC for now, as Pillar always returns UTC times.
2016-06-29 16:49:19 +02:00
a98986a261
Added pillarsdk.utils.is_valid_id(some_id) function.
...
This allows Pillar-Web to check for ID validity before sending IDs
from the URL to Pillar.
2016-06-29 13:05:04 +02:00
7b6a42f3e7
Bumped version to 1.3.0
2016-06-28 15:28:06 +02:00
cdb68fbcf7
Ensure Resource.find_first returns an object of the correct type.
2016-06-17 14:29:16 +02:00
9a256bf07d
Also expose ForbiddenAccess exception
2016-06-17 14:29:03 +02:00
b8048925a1
Force projection of Project.category and Project.user.
...
This is required for finding the home project.
2016-06-15 15:12:11 +02:00
7b96aa656b
Separated api.get() from utils.convert_datetime() call.
...
Both are equally likely to fail, so now we can see which from the stack
trace and the line number.
2016-05-31 17:58:13 +02:00
72499b6fbb
Added Resource.new(dict_or_resource) class method.
...
This allows one to up-cast a Resource to a File, Project, Node, etc.
2016-05-31 17:57:40 +02:00
03fab52da2
Prevent KeyError when thumbnail has no link.
...
This can happen when the link isn't refreshing properly. It's better to
show an empty thumbnail than a 500 Internal Server Error.
2016-05-31 17:57:08 +02:00