About factory_type_information
Why is needed this factory_type_information in CMFDehault.portal.py factory_type_information = ( Document.factory_type_information + Image.factory_type_information + File.factory_type_information + Link.factory_type_information + NewsItem.factory_type_information + Favorite.factory_type_information + DiscussionItem.factory_type_information + SkinnedFolder.factory_type_information ) as there is a specific factory_type_information in each type (document, file, etc) ? -- Andre PZP Enthusiast
Thanks ..... After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module. Am i right ? (i'm a newbie so my questions may be simples ones) Mark McEahern a écrit:
Why is needed this factory_type_information in CMFDehault.portal.py
Create a CMF site and then look in its portal_types tool. I suspect a light bulb will go on. ;-)
Cheers,
// m
-
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Andre PZP Enthusiast
After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module.
Am i right ? (i'm a newbie so my questions may be simples ones)
I'm still learning a lot about Zope and the CMF myself, but what I found helpful is lots of experimentation and examining Plone's source code. You'll notice their PloneSite subclasses CMFSite. PloneGenerator subclasses CMFDefault.Portal.PortalGenerator. They also have a neat concept of CustomizationPolicy objects. Cheers, // mark -
Mark McEahern a écrit:
After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module.
Am i right ? (i'm a newbie so my questions may be simples ones)
I'm still learning a lot about Zope and the CMF myself, but what I found helpful is lots of experimentation and examining Plone's source code. You'll notice their PloneSite subclasses CMFSite. PloneGenerator subclasses CMFDefault.Portal.PortalGenerator. They also have a neat concept of CustomizationPolicy objects.
That's right and that's what i'll need to do : a CustomizationPolicy. I'm examining Plone's source but as a newbie to Python, Zope and Plone, i have to examine many tutorials, books, scripts, etc at a time and i have a serious disability, i'm using W!ndows. Do you know that the search function of this os can't search a string in .py file like unix's grep could do ? So when i'm searching references to functions called from various modules, i must open all the files and search inside each one. So, from time to time i ask questions to have a path or a kick and to not give up. But, by having to search in all modules, i think i'll finally have a large vision of the whole system. Thank's for your help. Andre
Cheers,
// mark
-
-- Andre PZP Enthusiast
I'm examining Plone's source but as a newbie to Python, Zope and Plone, i have to examine many tutorials, books, scripts, etc at a time and i have a serious disability, i'm using W!ndows.
You should check out cygwin: http://www.cygwin.com/ It's a godsend for Windows. You have all the friendly Unix tools at your disposal: find, grep, cat, ls, rm, etc. Cheers, // m -
Mark McEahern a écrit:
You should check out cygwin:
Oh Thanks. I began to download it. -- Andre PZP Enthusiast
Oh Thanks. I began to download it.
What you'll find is that cygwin's default installation is somewhat barebones. It's designed that way for folks who are bandwidth sensitive. You can flip some of those buttons in setup to make it just download everything--which I do, but I have a broadband connection, so I can just sleep while it's working and not have a care in the world. So, if you find it squeaks when you type a command you expect to be there, you just have to re-run setup and make sure you grab that utility. Cheers, // mark -
Thanks Mark that's how i understood it. I downloaded the base package and will install it. Thanks for your help. Andre Mark McEahern a écrit:
Oh Thanks. I began to download it.
What you'll find is that cygwin's default installation is somewhat barebones. It's designed that way for folks who are bandwidth sensitive. You can flip some of those buttons in setup to make it just download everything--which I do, but I have a broadband connection, so I can just sleep while it's working and not have a care in the world.
So, if you find it squeaks when you type a command you expect to be there, you just have to re-run setup and make sure you grab that utility.
Cheers,
// mark
-
-- Andre PZP Enthusiast
FYI: your wrong. ;) You can search for text in windows by using the "containing text" box in the search window that opens up in explorer when you do a startment / search / files and folders... specify the file type, (if need be) and the directory, and put something in the text. Bob ----- Original Message ----- From: "D2" <borelan@wanadoo.fr> To: "Mark McEahern" <marklists@mceahern.com> Cc: <zope@zope.org> Sent: Thursday, January 23, 2003 2:12 PM Subject: Re: [Zope] About factory_type_information Mark McEahern a écrit:
After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module.
Am i right ? (i'm a newbie so my questions may be simples ones)
I'm still learning a lot about Zope and the CMF myself, but what I found helpful is lots of experimentation and examining Plone's source code. You'll notice their PloneSite subclasses CMFSite. PloneGenerator subclasses CMFDefault.Portal.PortalGenerator. They also have a neat concept of CustomizationPolicy objects.
That's right and that's what i'll need to do : a CustomizationPolicy. I'm examining Plone's source but as a newbie to Python, Zope and Plone, i have to examine many tutorials, books, scripts, etc at a time and i have a serious disability, i'm using W!ndows. Do you know that the search function of this os can't search a string in .py file like unix's grep could do ? So when i'm searching references to functions called from various modules, i must open all the files and search inside each one. So, from time to time i ask questions to have a path or a kick and to not give up. But, by having to search in all modules, i think i'll finally have a large vision of the whole system. Thank's for your help. Andre
Cheers,
// mark
-
-- Andre PZP Enthusiast _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Thanks but i know that for many years and that was what i did, as usual. I was very astonished by windows behaviour. I tried to search the string 'base' in OFS, specifying the file propertymanager.py wich contains the string 'base'. The search returned "no results found" or something similar. I'm running windows XP. It's a great evolution : no more blue screens. I have the same behaviour with PDF I tried to find the string 'bases' in lib.pdf (Python reference library). I launched from the directory containing my PDF, no results and there is a __bases__ in lib.pdf, isn't it ? I can't understand why Windows is so 'cruel' with me :) If you understand, let me know. Finally, having to read modules to find something is a way to learn. Think positive, think positive pfff..... Andre working4aliving a écrit:
FYI: your wrong. ;)
You can search for text in windows by using the "containing text" box in the search window that opens up in explorer when you do a startment / search / files and folders... specify the file type, (if need be) and the directory, and put something in the text.
Bob
----- Original Message ----- From: "D2" <borelan@wanadoo.fr> To: "Mark McEahern" <marklists@mceahern.com> Cc: <zope@zope.org> Sent: Thursday, January 23, 2003 2:12 PM Subject: Re: [Zope] About factory_type_information
Mark McEahern a écrit:
After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module.
Am i right ? (i'm a newbie so my questions may be simples ones)
I'm still learning a lot about Zope and the CMF myself, but what I found helpful is lots of experimentation and examining Plone's source code. You'll notice their PloneSite subclasses CMFSite. PloneGenerator
subclasses
CMFDefault.Portal.PortalGenerator. They also have a neat concept of CustomizationPolicy objects.
That's right and that's what i'll need to do : a CustomizationPolicy.
I'm examining Plone's source but as a newbie to Python, Zope and Plone, i have to examine many tutorials, books, scripts, etc at a time and i have a serious disability, i'm using W!ndows. Do you know that the search function of this os can't search a string in .py file like unix's grep could do ? So when i'm searching references to functions called from various modules, i must open all the files and search inside each one. So, from time to time i ask questions to have a path or a kick and to not give up. But, by having to search in all modules, i think i'll finally have a large vision of the whole system.
Thank's for your help.
Andre
Cheers,
// mark
-
-- Andre PZP Enthusiast
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Andre PZP Enthusiast
Wow... how about that. I don't run XP (hopefully never will). That really sucks. Windows isn't cruel to you, it's just cruel;) Bob ----- Original Message ----- From: "D2" <borelan@wanadoo.fr> To: "working4aliving" <working4aliving@hotmail.com> Cc: <zope@zope.org> Sent: Saturday, January 25, 2003 2:22 AM Subject: Re: [Zope] About factory_type_information Thanks but i know that for many years and that was what i did, as usual. I was very astonished by windows behaviour. I tried to search the string 'base' in OFS, specifying the file propertymanager.py wich contains the string 'base'. The search returned "no results found" or something similar. I'm running windows XP. It's a great evolution : no more blue screens. I have the same behaviour with PDF I tried to find the string 'bases' in lib.pdf (Python reference library). I launched from the directory containing my PDF, no results and there is a __bases__ in lib.pdf, isn't it ? I can't understand why Windows is so 'cruel' with me :) If you understand, let me know. Finally, having to read modules to find something is a way to learn. Think positive, think positive pfff..... Andre working4aliving a écrit:
FYI: your wrong. ;)
You can search for text in windows by using the "containing text" box in the search window that opens up in explorer when you do a startment / search / files and folders... specify the file type, (if need be) and the directory, and put something in the text.
Bob
----- Original Message ----- From: "D2" <borelan@wanadoo.fr> To: "Mark McEahern" <marklists@mceahern.com> Cc: <zope@zope.org> Sent: Thursday, January 23, 2003 2:12 PM Subject: Re: [Zope] About factory_type_information
Mark McEahern a écrit:
After reading portal.py, what i understood is that factory_type_information is used in the setup of a CMFSite, by PortalGenerator.setupType, to fill in portal_types tool with the default types. It's a way to customize a basic CMF Site If i want to add y own types, i can define a module sometype.py and add its factory_type_information to portal.factory_type_information otherwise i'll have to add a Factory_type_based_information in portal_types workspace. If i want to use PortalGenerator.setupTypes in my own module to register my type in portal_types, i suppose i'll have to create an instance of PortalGenerator in my module but that i don't need to use PortalGenerator as a base class of my module.
Am i right ? (i'm a newbie so my questions may be simples ones)
I'm still learning a lot about Zope and the CMF myself, but what I found helpful is lots of experimentation and examining Plone's source code. You'll notice their PloneSite subclasses CMFSite. PloneGenerator
subclasses
CMFDefault.Portal.PortalGenerator. They also have a neat concept of CustomizationPolicy objects.
That's right and that's what i'll need to do : a CustomizationPolicy.
I'm examining Plone's source but as a newbie to Python, Zope and Plone, i have to examine many tutorials, books, scripts, etc at a time and i have a serious disability, i'm using W!ndows. Do you know that the search function of this os can't search a string in .py file like unix's grep could do ? So when i'm searching references to functions called from various modules, i must open all the files and search inside each one. So, from time to time i ask questions to have a path or a kick and to not give up. But, by having to search in all modules, i think i'll finally have a large vision of the whole system.
Thank's for your help.
Andre
Cheers,
// mark
-
-- Andre PZP Enthusiast
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Andre PZP Enthusiast _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
D2 -
Mark McEahern -
working4aliving