Marnanel Thurman
ec486e180e
various AsyncResult fixes; another intermediate checkin
2018-10-03 20:28:52 +01:00
Marnanel Thurman
1c0971a066
fixed uninitialised variable
2018-10-03 20:27:53 +01:00
Marnanel Thurman
ff44834b34
Intermediate checkin for AsyncResult
2018-10-03 19:36:39 +01:00
Marnanel Thurman
cb193f69d7
Some basic logging.
...
QuarantinedMessages remove themselves when they're accepted as Activities.
2018-09-27 17:35:41 +01:00
Marnanel Thurman
91faeb0773
Activity.deploy() allows Activities to have side-effects when they're created.
2018-09-27 14:27:00 +01:00
Marnanel Thurman
6350ebe886
QuarantinedMessageNeeds are unique per (message, URL)
2018-09-23 23:57:09 +01:00
Marnanel Thurman
333c8590c7
enable celery
2018-09-23 21:59:13 +01:00
Marnanel Thurman
e061aba382
Messages with unresolved references don't cause an error for the sender.
2018-09-23 21:57:50 +01:00
Marnanel Thurman
27dfb4ac27
Add QuarantinedMessageNeeds.
...
QM.deploy() attemps to deploy.
If Activity.create() finds unresolved references,
it throws a NeedToFindException with a set of all of them,
not just the first one it finds.
2018-09-23 21:55:57 +01:00
Marnanel Thurman
6e648ffd86
NeedToFetchException takes a set of URLs, not a single URL
2018-09-23 21:55:17 +01:00
Marnanel Thurman
97cc4daf6d
Version number bump
2018-09-18 23:12:39 +01:00
Marnanel Thurman
cb5f115e45
Add "accepted" flag to Activity, which is a special case for Follows. Seems a bit hacky, though.
...
f_type becomes a CharField, because it was a URLField, which is blatantly wrong.
Activity now has the relevant properties to make it able to consider itself as an object type.
2018-09-18 23:10:58 +01:00
Marnanel Thurman
0812080730
rm django_kepi/collections.py, which should have been deleted ages ago
2018-09-18 22:52:15 +01:00
Marnanel Thurman
4b6efe6a9e
much better error message for incorrect params when creating an Activity
2018-09-18 22:47:10 +01:00
Marnanel Thurman
2b29a8e8e2
Removed all the old Cobject stuff, at last. This confused
...
makemigrations so much that I killed all the existing migrations
and started again.
Activity fields representing key+value pairs all begin with "f_"
because it was getting confusing when only some of them did.
Activity.deserialize() renamed Activity.create().
The tests don't all pass at present, but they will soon.
2018-09-16 21:42:27 +01:00
Marnanel Thurman
75eb3d6764
QuarantinedMessage, and an InboxView to create them
2018-09-13 16:06:33 +01:00
Marnanel Thurman
78b8a4819e
Fixed a lot of confusion over "ftype", "atype", and "type" identifiers.
...
Imported NeedToFetchException so deserialising Activities will work properly.
2018-09-12 23:46:57 +01:00
Marnanel Thurman
7820f87e40
resolve() allows types' find_activity() methods to throw DoesNotExist, and treats it as returning None.
...
NeedToFetchException allows its "url" parameter to be specified positionally.
2018-09-12 23:44:58 +01:00
Marnanel Thurman
2325fe86c4
some migrations which should have been committed!
2018-09-12 02:51:16 +01:00
Marnanel Thurman
140dfe795f
Activity.deserialize() correctly accesses its list of types.
...
First test for it (which found the above bug).
2018-09-12 02:50:08 +01:00
Marnanel Thurman
8c3d13ed46
New design for Activity, since we need to deserialise everything in the same place.
...
NeedToFetchException added.
rm mistaken params in TombstoneException's call to superclass's constructor.
URL_FORMAT -> ACTIVITY_URL_FORMAT for clarity.
rm tests for old code which is going away soon.
2018-09-10 13:56:31 +01:00
Marnanel Thurman
bd907af51b
intermediate
2018-09-07 15:03:55 +01:00
Marnanel Thurman
d5ccee5e2a
Don't check Iterable-- strings are iterable!
2018-09-07 14:54:26 +01:00
Marnanel Thurman
553c3d8d3d
Okay, the NamedObject table was a mistake. Let's use the existing registration system.
2018-09-06 23:01:18 +01:00
Marnanel Thurman
928934eab2
First steps with the resolver
2018-09-06 20:00:39 +01:00
Marnanel Thurman
c066ff7e80
test_tombstone_collection_response() added
...
CollectionResponse correctly uses x.activity instead of str(x)
CollectionResponse handles TombstoneException correctly
2018-09-06 18:47:24 +01:00
Marnanel Thurman
52855a96b4
Don't assert that collections are ordered; they're always ordered
2018-09-06 17:21:17 +01:00
Marnanel Thurman
efe245739b
Fixed call to __super__.__init__() in CollectionResponse. Re-added _make_index_page.
2018-09-06 16:08:43 +01:00
Marnanel Thurman
69f26c183f
__str__ on TombstoneException
2018-09-06 15:50:27 +01:00
Marnanel Thurman
99ef7250aa
qualify TombstoneResponse
2018-09-06 15:44:20 +01:00
Marnanel Thurman
3da527d639
intermediate
2018-09-05 23:09:11 +01:00
Marnanel Thurman
f2b8c6b7c8
First sketch of splitting out the responses from the views
2018-09-05 22:53:50 +01:00
Marnanel Thurman
51c9129fec
Actor.__str__ uses self to access member variables. Silly mistake.
...
Version number bump.
2018-09-02 22:09:26 +01:00
Marnanel Thurman
e6346ddcda
Version number bump to 0.0.15
2018-09-01 22:55:22 +01:00
Marnanel Thurman
27c218e42b
Check both following and followed views
2018-09-01 22:54:51 +01:00
Marnanel Thurman
5ea5e6193f
Drop YourPerson. It was only confusing things.
2018-09-01 22:54:30 +01:00
Marnanel Thurman
abb30341f7
Version number bump
2018-09-01 18:20:44 +01:00
Marnanel Thurman
514f5ecadf
Tests for FollowersView (they pass)
2018-09-01 18:19:48 +01:00
Marnanel Thurman
2ff911de96
The return of FollowersView
2018-09-01 18:19:10 +01:00
Marnanel Thurman
81a27fb853
ActivityObjectView delegates to its subclass for content via objectDetails().
...
Actor has a string representation.
FollowersView removed for now, because testing it is too fiddly
(it's not obvious how to construct the URL for the test client
now that we're using URLs as identifiers). It may be back later.
Version number bump.
2018-08-31 17:55:57 +01:00
Marnanel Thurman
a98d508cd3
oops, forgot migration
2018-08-30 19:59:48 +01:00
Marnanel Thurman
5a7307a0cf
RequestingAccess had some singulars and plurals the wrong way round
2018-08-30 19:54:25 +01:00
Marnanel Thurman
194fa96f12
Version number bump to 0.0.10
2018-08-30 01:03:24 +01:00
Marnanel Thurman
dd8daa7f66
Added tests to ensure that other apps can make to our data.
...
Reworked Actor: the only thing we know about an Actor is their URL.
Removed tests for Followers collections because it's hard to test
without subclassing the view. I may put it back in later.
2018-08-30 00:59:38 +01:00
Marnanel Thurman
6e63dcdeab
Actor's "name" is a URLField, not a CharField.
...
The identifying URL is the only information we can be sure we have.
ThingUser's "name" field is modified similarly.
get_or_make() method is added to Actor.
ThingUser's as_activity() method is renamed to serialize() for consistency.
2018-08-29 20:21:39 +01:00
Marnanel Thurman
482033504d
some models added to the admin console; also, version bump to 0.0.9
2018-08-28 22:29:11 +01:00
Marnanel Thurman
9cb6469ecb
name, not username. Version bump.
2018-08-28 15:44:47 +01:00
Marnanel Thurman
d54103b3a5
RequestingAccess model
2018-08-28 14:22:45 +01:00
Marnanel Thurman
7ab0d11b30
Version number bump (oops)
2018-08-28 14:06:09 +01:00
Marnanel Thurman
4d9dd5227d
Foreign keys of Blocking have the correct names, and not Following's names!
2018-08-28 14:05:13 +01:00
Marnanel Thurman
a18846b409
Added Blocking relationship. Version number bump to 0.0.3. Tests are passing.
2018-08-28 13:57:38 +01:00
Marnanel Thurman
256822ddbc
version number bump to 0.0.2
2018-08-28 13:17:11 +01:00
Marnanel Thurman
91d9066f53
make_query_page() and render() become methods of ActivityObjectView;
...
CollectionView becomes a subclass of ActivityObjectView in order to
use them.
2018-08-28 13:16:07 +01:00
Marnanel Thurman
c04a83e442
intermediate
2018-08-27 18:53:52 +01:00
Marnanel Thurman
507a39ee0e
fixed expression deciding when to include 'next' in collection pages
2018-08-26 22:44:27 +01:00
Marnanel Thurman
f310a57672
oops, follower, not following
2018-08-26 21:03:56 +01:00
Marnanel Thurman
da0af79011
_stringify_object
2018-08-26 21:03:00 +01:00
Marnanel Thurman
f31caf1264
intermediate
2018-08-26 20:07:27 +01:00
Marnanel Thurman
9157c2f215
intermediate
2018-08-26 19:27:45 +01:00
Marnanel Thurman
26720a9b69
fix urldefrag call
2018-08-25 00:07:36 +01:00
Marnanel Thurman
dbf8f149c0
intermediate
2018-08-25 00:04:08 +01:00
Marnanel Thurman
d3e90ec4c7
intermediate
2018-08-24 19:29:35 +01:00
Marnanel Thurman
38fbaf3366
intermediate
2018-08-24 18:13:57 +01:00
Marnanel Thurman
cacb67345e
Starting to get the tests in order
2018-08-20 20:14:49 +01:00
Marnanel Thurman
8fb9844a92
intermediate
2018-08-20 16:08:06 +01:00
Marnanel Thurman
354eee6a47
let's use a SlugField to identify Activities
2018-08-20 00:33:40 +01:00
Marnanel Thurman
8e9b36696a
actually let's just not bother with Register
2018-08-20 00:10:19 +01:00
Marnanel Thurman
e1a3aca719
intermediate
2018-08-19 21:47:54 +01:00
Marnanel Thurman
f9c3447013
is_local
2018-08-19 19:02:40 +01:00
Marnanel Thurman
0f88fad085
objects have default url IDs
2018-08-19 19:02:11 +01:00
Marnanel Thurman
27098c9bfa
recursive serializer; foo_as_url methods
2018-08-19 17:47:11 +01:00
Marnanel Thurman
0c07191660
it's the instance that has the data, not the class
2018-08-19 16:56:18 +01:00
Marnanel Thurman
368434fd89
renamed activity_fields() to serialize() throughout. rm old call to register_type which no longer exists
2018-08-19 16:49:48 +01:00
Marnanel Thurman
be18932ca3
intermediate
2018-08-19 04:11:44 +01:00
Marnanel Thurman
f68205fa1c
Corrected null handling on models
2018-08-19 01:33:37 +01:00
Marnanel Thurman
737e58d6cd
Rewrite of much of django_kepi/models.py to use GenericForeignKeys.
...
Unfortunately, now the tests break...
2018-08-18 20:21:39 +01:00
Marnanel Thurman
1c09eb1d5d
one-to-one links from ActivityObject
2018-08-12 14:06:26 +01:00
Marnanel Thurman
8e8a18c193
tests are somewhat closer to passing
2018-08-11 20:03:39 +01:00
Marnanel Thurman
caeeceea5d
further intermediate work
2018-08-11 17:21:56 +01:00
Marnanel Thurman
830d2d30e1
a very basic sketch
2018-08-11 17:01:54 +01:00
Marnanel Thurman
6c3f76fb8f
Add fields
2018-08-08 19:41:05 +01:00
Marnanel Thurman
741c0469dd
Move old tests into the tests/ directory, and create tests/__init__.py
2018-08-08 19:40:21 +01:00
Marnanel Thurman
82ff157579
django-kepi -> django_kepi, what was I thinking
2018-08-07 16:34:36 +01:00