[ckan-changes] [okfn/ckan] 5119a7: [#2304] Refactor the follower model

GitHub noreply at github.com
Fri May 11 16:03:25 UTC 2012


  Branch: refs/heads/feature-2304-follow
  Home:   https://github.com/okfn/ckan
  Commit: 5119a7fd7eba629c3df02d76dfc38df7873b2610
      https://github.com/okfn/ckan/commit/5119a7fd7eba629c3df02d76dfc38df7873b2610
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-05-11 (Fri, 11 May 2012)

  Changed paths:
    M ckan/controllers/package.py
    M ckan/controllers/user.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/auth/create.py
    M ckan/logic/auth/delete.py
    M ckan/logic/auth/publisher/create.py
    M ckan/logic/auth/publisher/delete.py
    M ckan/logic/schema.py
    M ckan/logic/validators.py
    M ckan/model/__init__.py
    M ckan/model/follower.py
    M ckan/public/scripts/application.js
    M ckan/templates/package/layout.html
    M ckan/templates/user/layout.html
    M ckan/tests/functional/api/test_follow.py

  Log Message:
  -----------
  [#2304] Refactor the follower model

Now uses two many-many relationship tables UserFollowingUser and
UserFollowingDataset instead of one Follower table, so the user IDs and
dataset
IDs can now be foreign keys with on update cascade and on delete
cascade.

default_create_follower_schema() becomes default_follow_user_schema()
and
default_follow_dataset_schema().

follower_dictize() becomes user_following_user_dictize() and
user_following_dataset_dictize().

follower_dict_save() becomes user_following_user_dict_save() and
user_following_dataset_dict_save().

follower_create() becomes follow_user() and follow_dataset().

follower_delete() becomes unfollow_user() and unfollow_dataset().

follower_count() becomes user_follower_count() and
dataset_follower_count().

follower_list() becomes user_follower_list() and
dataset_follower_list().

am_following() becomes am_following_user() and am_following_dataset().

Removed the follower_create() and follower_delete() auth functions,
anyone can
follow or unfollow anything as long as they're logged in.

Follower specific validation functions aren't needed anymore.





More information about the ckan-changes mailing list