René's URL Explorer Experiment


Title: Make register_templates plugin-friendly · Issue #703 · feincms/feincms · GitHub

Open Graph Title: Make register_templates plugin-friendly · Issue #703 · feincms/feincms

X Title: Make register_templates plugin-friendly · Issue #703 · feincms/feincms

Description: Context: When creating a FeinCMS site using some kind of plugin mechanism, I ran into this problem. Each plugin wants to contribute some Template to the main project. To do that, it will do something like from feincms.module.page.models ...

Open Graph Description: Context: When creating a FeinCMS site using some kind of plugin mechanism, I ran into this problem. Each plugin wants to contribute some Template to the main project. To do that, it will do somethi...

X Description: Context: When creating a FeinCMS site using some kind of plugin mechanism, I ran into this problem. Each plugin wants to contribute some Template to the main project. To do that, it will do somethi...

Opengraph URL: https://github.com/feincms/feincms/issues/703

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make register_templates plugin-friendly","articleBody":"Context: When creating a FeinCMS site using some kind of plugin mechanism, I ran into this problem.\r\n\r\nEach plugin wants to contribute some Template to the main project. To do that, it will do something like\r\n\r\n```python\r\nfrom feincms.module.page.models import Page\r\n\r\nregions_main = (('main', 'Content'), )\r\nPage.register_templates(\r\n    {'key': 'mmmmh', 'title': 'Tasty template', 'path': 'munch/nomnom.html', 'regions': regions_main}\r\n)\r\n```\r\n\r\nThis will not work.\r\n\r\nEach region holds a list of content types that can be used in that region. Unfortunately, this list is built when a concrete content type is created, so calling `register_templates` again later will add regions that have no content types at all. \r\n\r\nI can paper over this by patching in all content types here\r\n\r\n```python\r\nfor region in Page._feincms_all_regions:\r\n    if not region._content_types:\r\n        region._content_types = Page._feincms_content_types.copy()  # copy is important otherwise CTs will be duplicated\r\n```\r\n\r\nbut that is not always what is wanted, since I can't restrict CTs to a region that way. \r\n\r\nIf we ever want to restrict a CT to a certain region, things will become more complicated (the region set for each CT is not stored anywhere, so that information is lost once the CT has been instanciated).\r\n\r\nFood for thought...\r\n","author":{"url":"https://github.com/mjl","@type":"Person","name":"mjl"},"datePublished":"2022-04-20T10:19:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/703/feincms/issues/703"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0089eced-681b-2cff-715a-239b3fe114a3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA780:243FA0:8C6612C:B4E7E3C:6975F211
html-safe-nonce77383b5d15792d222e04c0597f2246ea2ae8c0a9391b826148600e82735260dc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzgwOjI0M0ZBMDo4QzY2MTJDOkI0RTdFM0M6Njk3NUYyMTEiLCJ2aXNpdG9yX2lkIjoiNjQ5ODA0Nzc2ODQwNzY5OTk4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbbccbb2ac6d3466a366b75febe908b904c20d3ede056dd1889cc2699754a779d
hovercard-subject-tagissue:1209480024
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/feincms/703/issue_layout
twitter:imagehttps://opengraph.githubassets.com/41cff0f564873d5a32b063d5a1859651df2406ed566dddb1989d85115f2448a4/feincms/feincms/issues/703
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/41cff0f564873d5a32b063d5a1859651df2406ed566dddb1989d85115f2448a4/feincms/feincms/issues/703
og:image:altContext: When creating a FeinCMS site using some kind of plugin mechanism, I ran into this problem. Each plugin wants to contribute some Template to the main project. To do that, it will do somethi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemjl
hostnamegithub.com
expected-hostnamegithub.com
None2bce766e7450b03e00b2fc5badd417927ce33a860e78cda3e4ecb9bbd1374cc6
turbo-cache-controlno-preview
go-importgithub.com/feincms/feincms git https://github.com/feincms/feincms.git
octolytics-dimension-user_id935594
octolytics-dimension-user_loginfeincms
octolytics-dimension-repository_id116021
octolytics-dimension-repository_nwofeincms/feincms
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id116021
octolytics-dimension-repository_network_root_nwofeincms/feincms
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
releasefcca2b8ef702b5f7f91427a6e920fa44446fe312
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/feincms/feincms/issues/703#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeincms%2Ffeincms%2Fissues%2F703
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%2Ffeincms%2Fissues%2F703
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%2Ffeincms
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms/issues/703
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms/issues/703
Reloadhttps://patch-diff.githubusercontent.com/feincms/feincms/issues/703
feincms https://patch-diff.githubusercontent.com/feincms
feincmshttps://patch-diff.githubusercontent.com/feincms/feincms
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms
Fork 236 https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms
Star 1.1k https://patch-diff.githubusercontent.com/login?return_to=%2Ffeincms%2Ffeincms
Code https://patch-diff.githubusercontent.com/feincms/feincms
Issues 25 https://patch-diff.githubusercontent.com/feincms/feincms/issues
Pull requests 2 https://patch-diff.githubusercontent.com/feincms/feincms/pulls
Actions https://patch-diff.githubusercontent.com/feincms/feincms/actions
Projects 0 https://patch-diff.githubusercontent.com/feincms/feincms/projects
Wiki https://patch-diff.githubusercontent.com/feincms/feincms/wiki
Security 0 https://patch-diff.githubusercontent.com/feincms/feincms/security
Insights https://patch-diff.githubusercontent.com/feincms/feincms/pulse
Code https://patch-diff.githubusercontent.com/feincms/feincms
Issues https://patch-diff.githubusercontent.com/feincms/feincms/issues
Pull requests https://patch-diff.githubusercontent.com/feincms/feincms/pulls
Actions https://patch-diff.githubusercontent.com/feincms/feincms/actions
Projects https://patch-diff.githubusercontent.com/feincms/feincms/projects
Wiki https://patch-diff.githubusercontent.com/feincms/feincms/wiki
Security https://patch-diff.githubusercontent.com/feincms/feincms/security
Insights https://patch-diff.githubusercontent.com/feincms/feincms/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feincms/feincms/issues/703
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feincms/feincms/issues/703
Make register_templates plugin-friendlyhttps://patch-diff.githubusercontent.com/feincms/feincms/issues/703#top
enhancementhttps://github.com/feincms/feincms/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/mjl
https://github.com/mjl
mjlhttps://github.com/mjl
on Apr 20, 2022https://github.com/feincms/feincms/issues/703#issue-1209480024
enhancementhttps://github.com/feincms/feincms/issues?q=state%3Aopen%20label%3A%22enhancement%22
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.