René's URL Explorer Experiment


Title: How to limit targets in move page view · Issue #41 · feincms/feincms3 · GitHub

Open Graph Title: How to limit targets in move page view · Issue #41 · feincms/feincms3

X Title: How to limit targets in move page view · Issue #41 · feincms/feincms3

Description: It would be nice to have a way to disallow certain targets in the move view - e.g. moving pages outside of a "Home" node or disallow moving pages before fixed pages (read: node stays always on top in menu). I tried to monkey patch feincm...

Open Graph Description: It would be nice to have a way to disallow certain targets in the move view - e.g. moving pages outside of a "Home" node or disallow moving pages before fixed pages (read: node stays always on top ...

X Description: It would be nice to have a way to disallow certain targets in the move view - e.g. moving pages outside of a "Home" node or disallow moving pages before fixed pages (read: node stays alwa...

Opengraph URL: https://github.com/feincms/feincms3/issues/41

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to limit targets in move page view","articleBody":"It would be nice to have a way to disallow certain targets in the move view - e.g. moving pages outside of a \"Home\" node or disallow moving pages before fixed pages (read: node stays always on top in menu).\r\n\r\nI tried to monkey patch feincms3.admin.MoveForm.__generate_choices method and filter only for allowed pages but to no success.\r\n\r\nI somehow got it working now by overwriting the feincms3.admin.MoveForm.clean() method - but that feels wrong and is not very user friendly as all the move targets are still shown in the admin UI:\r\n\r\n```python\r\nclass MyMoveForm(MoveForm):\r\n    def clean(self):\r\n        data = super().clean()\r\n        if not data.get(\"new_location\"):\r\n            return data\r\n        if self.request.user.is_superuser:\r\n           return data\r\n\r\n        # don't allow to create a new root node\r\n        relative = data[\"relative\"]\r\n        first_or_right = data[\"first_or_right\"]\r\n        if not relative:\r\n            raise ValidationError(\"You do not have the permission to move this page here!\")\r\n        elif first_or_right =='right' and not relative.parent:\r\n            raise ValidationError(\"You do not have the permission to move this page here!\")\r\n\r\n\r\n@admin.register(models.Page)\r\nclass PageAdmin(ContentEditor, TreeAdmin):\r\n    ...\r\n\r\n    def move_view(self, request, obj):\r\n        return self.action_form_view(\r\n            request, obj, form_class=MyMoveForm, title=f\"Move {obj}\"\r\n        )\r\n```\r\n\r\nAn option to disallow certain pages as move target or any idea how to tackle that in a smart way is very appreciated. ","author":{"url":"https://github.com/barsch","@type":"Person","name":"barsch"},"datePublished":"2024-05-02T02:37:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/41/feincms3/issues/41"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e4aa54b0-b2b5-41c1-09e6-f8451a78516c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9320:381D90:1005236:165B702:6977AA8C
html-safe-noncee11cdaf46211c2676ba159c3a3871c12bb047cf17d567543ca575472c5eeded8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzIwOjM4MUQ5MDoxMDA1MjM2OjE2NUI3MDI6Njk3N0FBOEMiLCJ2aXNpdG9yX2lkIjoiNjgyMjgzMTQ3NzM0NDQxNDM0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccb09c32909983ecc88414f8ffae4c325681c210eee785d923f78e14dff188fbe
hovercard-subject-tagissue:2274482082
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feincms/feincms3/41/issue_layout
twitter:imagehttps://opengraph.githubassets.com/171f2649182171603f4c0cdbb0318dc8682774ca0a50aed8a412b002dec67f2a/feincms/feincms3/issues/41
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/171f2649182171603f4c0cdbb0318dc8682774ca0a50aed8a412b002dec67f2a/feincms/feincms3/issues/41
og:image:altIt would be nice to have a way to disallow certain targets in the move view - e.g. moving pages outside of a "Home" node or disallow moving pages before fixed pages (read: node stays always on top ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebarsch
hostnamegithub.com
expected-hostnamegithub.com
Nonee8b91803a5fc7ac066710509c57c636dab6ed4620bd9213b470a4617c79989c9
turbo-cache-controlno-preview
go-importgithub.com/feincms/feincms3 git https://github.com/feincms/feincms3.git
octolytics-dimension-user_id935594
octolytics-dimension-user_loginfeincms
octolytics-dimension-repository_id61632866
octolytics-dimension-repository_nwofeincms/feincms3
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id61632866
octolytics-dimension-repository_network_root_nwofeincms/feincms3
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9b4562e3c5c60b38349a7d80ec8e160c11fe84b6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/feincms/feincms3/issues/41#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeincms%2Ffeincms3%2Fissues%2F41
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeincms%2Ffeincms3%2Fissues%2F41
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feincms%2Ffeincms3
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms3/issues/41
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms3/issues/41
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms3/issues/41
feincms https://patch-diff.githubusercontent.com/feincms
feincms3https://patch-diff.githubusercontent.com/feincms/feincms3
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms3
Fork 12 https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms3
Star 103 https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms3
Code https://patch-diff.githubusercontent.com/feincms/feincms3
Issues 6 https://patch-diff.githubusercontent.com/feincms/feincms3/issues
Pull requests 1 https://patch-diff.githubusercontent.com/feincms/feincms3/pulls
Actions https://patch-diff.githubusercontent.com/feincms/feincms3/actions
Projects 0 https://patch-diff.githubusercontent.com/feincms/feincms3/projects
Security 0 https://patch-diff.githubusercontent.com/feincms/feincms3/security
Insights https://patch-diff.githubusercontent.com/feincms/feincms3/pulse
Code https://patch-diff.githubusercontent.com/feincms/feincms3
Issues https://patch-diff.githubusercontent.com/feincms/feincms3/issues
Pull requests https://patch-diff.githubusercontent.com/feincms/feincms3/pulls
Actions https://patch-diff.githubusercontent.com/feincms/feincms3/actions
Projects https://patch-diff.githubusercontent.com/feincms/feincms3/projects
Security https://patch-diff.githubusercontent.com/feincms/feincms3/security
Insights https://patch-diff.githubusercontent.com/feincms/feincms3/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feincms/feincms3/issues/41
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feincms/feincms3/issues/41
How to limit targets in move page viewhttps://patch-diff.githubusercontent.com/feincms/feincms3/issues/41#top
https://github.com/barsch
https://github.com/barsch
barschhttps://github.com/barsch
on May 2, 2024https://github.com/feincms/feincms3/issues/41#issue-2274482082
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.