The (Specific) Placement of Custom Content Type Code

Skip to first unread message

Ron Chichester

Sep 5, 2015, 3:01:26 PM9/5/15
to substanced-users

First, thanks to all who work on Substance D.  This project has great promise.

I was reading through the documentation, specifically the part about defining content.  (  That document was a great introduction to making your own object types, and gave examples.  

The thing that was missing from that documentation, or the thing that I found particularly elusive was *where* to put that file so that Substance D would see it and incorporate that new Content Type.  If I was to make my own module named blog.resources, where would I save it so that Substance D could make use of it?

Thanks again...

Carlos de la Guardia

Sep 5, 2015, 4:19:45 PM9/5/15

you can put it anywhere inside your package. If you are using the @content decorator to declare your content type, all you need to do is make sure your calls config.scan() and the content will be initialized. Scan is a Pyramid concept, which is why it's not explained there. We might need to make a link from the content docs to here:

Instead of using scan(), you could also import your content from any module and use call config.add_content_type:

config.add_content_type('Blog Entry', BlogEntry)

Hope that helps.

Carlos de la Guardia

From: Ron Chichester <>
To: substanced-users <>
Sent: Saturday, September 5, 2015 2:01 PM
Subject: The (Specific) Placement of Custom Content Type Code

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
For more options, visit

Reply all
Reply to author
0 new messages