[ckan-changes] [okfn/ckan] 4145f0: [#3005] Add model and API for following groups

GitHub noreply at github.com
Tue Oct 23 17:24:46 UTC 2012


  Branch: refs/heads/feature-3005-add-following-of-groups
  Home:   https://github.com/okfn/ckan
  Commit: 4145f00a4a046ad321183140d2c75fac0b55c651
      https://github.com/okfn/ckan/commit/4145f00a4a046ad321183140d2c75fac0b55c651
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-23 (Tue, 23 Oct 2012)

  Changed paths:
    M ckan/lib/activity_streams.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/dictization/model_save.py
    M ckan/logic/action/create.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/converters.py
    M ckan/logic/schema.py
    M ckan/logic/validators.py
    A ckan/migration/versions/061_add_follower__group_table.py
    M ckan/model/__init__.py
    M ckan/model/follower.py

  Log Message:
  -----------
  [#3005] Add model and API for following groups

This implements everything required at the model and API level for following
and unfollowing of groups, getting a group's number of followers or a list of a
group's followers, and getting the number of groups that a user follows or a
list of the groups that a user follows.

Tests need to be added.

Frontend for following groups needs to be added.

+ Add UserFollowingGroup model class and user_following_group_dictize().

+ Add "{actor} started following {group}" activity stream activity.

+ Refactor user_following_user_dict_save() and
  user_following_dataset_dict_save(), replace with a single
  follower_dict_save() that can be used for UserFollowingUser,
  UserFollowingDataset, or UserFollowingGroup.

+ Add follow_group() and unfollow_group() logic action functions in create.py
  and delete.py.

+ Add group_follower_count(), group_follower_list(), am_following_group(),
  group_followee_count() and group_followee_list() logic action functions in
  get.py.

  Also refactor some code in logic/action/get.py to remove duplication between
  follower functions.

+ Add convert_group_name_or_id_to_id() converter function

+ Add default_follow_group_schema()

+ Add migration script





More information about the ckan-changes mailing list