Get URL of saved resource from its model
I would like to be able to get the URL of a resource from its model.
It would be useful in the post_save
receiver of djangoldp_notifications to know which resource is targeted.
I would like to be able to get the URL of a resource from its model.
It would be useful in the post_save
receiver of djangoldp_notifications to know which resource is targeted.
something like '/{}'.format(get_resolver().reverse_dict[view_name][0][0][0], instance.pk)
?
By Jean-Baptiste on 2019-02-11T09:43:16 (imported from GitLab project)
@bleme I think it'd be great to offer a function to componants for that
assigned to @bleme
By Jean-Baptiste on 2019-02-19T13:57:44 (imported from GitLab project)
created merge request !24 (merged) to address this issue
By Jean-Baptiste on 2019-02-19T13:58:52 (imported from GitLab project)
mentioned in merge request !24 (merged)
By Jean-Baptiste on 2019-02-19T13:58:52 (imported from GitLab project)
@matthieu You can test the merge request https://git.happy-dev.fr/startinblox/djangoldp-packages/djangoldp/merge_requests/24 branch (and merge it if it's ok for you)
By Jean-Baptiste on 2019-02-19T15:29:21 (imported from GitLab project)
added 2h of time spent at 2019-02-19
By Jean-Baptiste on 2019-02-19T15:29:00 (imported from GitLab project)
changed milestone to %0.5
closed via merge request !24 (merged)
By Jean-Baptiste on 2019-02-20T11:31:21 (imported from GitLab project)
mentioned in commit 918f8ea4
By Jean-Baptiste on 2019-02-20T11:31:22 (imported from GitLab project)