Overriding content and root not working

35 views
Skip to first unread message

Jo G

unread,
Mar 26, 2015, 1:42:04 PM3/26/15
to substanc...@googlegroups.com
Hi, I used the scaffold to create my own substanced app and I am now trying to adapt it to be like the demo blog app in the substanced folder.
I have changed my resources file to override the root object (policy) and have then created a new content type (people) which inherits from a folder and another persistent type (person) that is addable as a child of people.
Unlike with the blog app I can still see file and folder as content types and can't yet see my new content types. Do I need to change something elsewhere or are all the changes in the resources file?

I had successfully created an additional persistent content type (person) which I could see in the add drop down on the main management screen. Now it has all disappeared. 

Do I need to change something elsewhere to ensure that only my new Root object is used or have I just made a rookie error in resources?

Thanks in advance



Carlos de la Guardia

unread,
Mar 26, 2015, 8:48:06 PM3/26/15
to substanc...@googlegroups.com
Hard to tell without looking at code. Can you paste the relevant parts of your code somewhere?

Carlos de la Guardia


From: Jo G <joannegil...@gmail.com>
To: substanc...@googlegroups.com
Sent: Thursday, March 26, 2015 11:42 AM
Subject: Overriding content and root not working

--
You received this message because you are subscribed to the Google Groups "substanced-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to substanced-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jo G

unread,
Mar 27, 2015, 7:35:32 AM3/27/15
to substanc...@googlegroups.com, cgua...@yahoo.com
Hi, thanks. I am having another go through to see if I can work out the issue if there is no obvious missing setup elsewhere - I'll post on Monday if it isn't becoming obvious.

Jo G

unread,
Mar 30, 2015, 11:37:19 AM3/30/15
to substanc...@googlegroups.com, cgua...@yahoo.com
OK. so I can't see anything so am looking for help.

I had several levels of new content types but to try and get it working I have commented out everything beyond the first two levels (policy and people). I have attached the resources file and the views file. Can anyone see what is wrong? When it creates the management  view the root object is still root and not Policy so all I see are files and folders and no people.

When I run the code for the substanced demo 'blog' the root object is overridden and becomes the Blog object. What have I missed?

Thanks in advance.
personmanage.py
personresources.py

Tres Seaver

unread,
Mar 30, 2015, 11:59:34 AM3/30/15
to substanc...@googlegroups.com
On 03/30/2015 11:37 AM, Jo G wrote:
> OK. so I can't see anything so am looking for help.
>
> I had several levels of new content types but to try and get it working I
> have commented out everything beyond the first two levels (policy and
> people). I have attached the resources file and the views file. Can anyone
> see what is wrong? When it creates the management view the root object is
> still root and not Policy so all I see are files and folders and no people.
>
> When I run the code for the substanced demo 'blog' the root object is
> overridden and becomes the Blog object. What have I missed?

Maybe the `Data.fs` file was created before your custom 'Root' type was
declared? Try removing it (or moving it aside) and then restarting.



Tres.
--
===================================================================
Tres Seaver +1 540-429-0999 tse...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com

Jo G

unread,
Mar 31, 2015, 4:18:58 AM3/31/15
to substanc...@googlegroups.com
Of course. I'd recreated the databases early on but then forgot about that when I made the next round of changes. 
Thanks Tres.
Reply all
Reply to author
Forward
0 new messages