Hello *Eduardo*!

*Thanks* for the detailed answer. 

Now here is the thing When I said that I was extending from *Displayable *That 
was supposed to mean that I'm inheriting abstract model in my Custom 
content type. I can create items in database using *admin-site *and I've 
know a hefty amount about Django ORM. I know what displayable provides in 
that case. But what I was hoping for a similar method to access data in 
django template as in Docs You can access data of custom fields in model 
extended from *Page.* 

{{ page.some_model.title }}
{{ page.some_model.slug }}
{{ page.some_model.custom_field }}
  
What I got from your answer is there is no way to access data in django 
template of model which is inheriting Displayable as it is not in context. 
Only way to get that data is to use custom urls, views and templates. It's 
like just getting some basics but implement almost everything to get data 
from db (on url parameters or something). Then pass it as context to 
template response along with django template just like Blog.

Actually Our old app uses mezzenine but inherits everything from *Page*. 
And using that we can easily access data using page in context in django 
template. But that does seems wrong to create everything as page. But what 
I understood that If I were to fix it I will have to write all those urls 
and views by myself.

If I understood something wrong please help. Also I do have another 
question so if I have model inheriting *Displayable* and now I need info 
from that model in pages other that specific pages provided by custom urls 
and views. how would I do it. For *Example* I need 3 recent blog posts on 
home page. So how would I access them. Would I have to write custom View 
for Home page and if so then I'm just overriding Home page default view as 
it is *RichTextPage* at this point.

If anything seems confusing I would be happy to provide further information.

Help is highly appreciated.

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

Reply via email to