Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to access "current object" from apphook models #8311

@wfehr

Description

@wfehr

When accessing a page via slug (e.g. /foo) and when editing corresponding content-placeholder (= admin/cms/placeholder/object/../edit/../) you get current_page inside the request-object.

When working with apphooks the current_page is also available via slug (e.g. /apphook-page).

Example with djangocms-stories:

When accessing a post-model, it adds the current object via PostDetailView.get_object().
Now when editing the content for this object, you are directed towards the placeholder editing (e.g. admin/cms/placeholder/...).
-> how can you now access the "current object" (e.g. post) in this case?

Is it just something that needs to be adjusted in djangocms-stories (and in general for apphook models) or is this currently not available?
If it is available: Are there already docs pointing this out?

Wasn't quite successful in my search :/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions