a working example of using mezzanine

48 views
Skip to first unread message

Dan Lopez

unread,
Mar 15, 2012, 10:49:56 AM3/15/12
to Mezzanine Users

Hi guys,

is there any little working example somewhere where we can understand
the basics of how mezzanine associates pages created in the backend
with templates through the model? Something that tick the boxes:

1.- Create the template with the corresponding tags.
2.- Create the view querying the page model for example.
3.- Any change applicable to the urls.py in order to show the test
page.

Thanks a lot in advance,

Dan.

Josh Cartmell

unread,
Mar 15, 2012, 12:54:12 PM3/15/12
to mezzani...@googlegroups.com
Once you have set up your mezzanine project correctly pages you create in the backend will automatically show up without modifying additional urls or views.  As far as the template that is used for a specific page check out this:
http://mezzanine.jupo.org/docs/content-architecture.html#page-templates

For example, if you create a rich text page it will by default be rendered by pages/richtextpage.html.

Let us know if you still have questions.

Josh

Stephen McDonald

unread,
Mar 15, 2012, 3:58:22 PM3/15/12
to mezzani...@googlegroups.com
And since you mentioned the view for pages, here's the code for it if you'd like to get a better understanding:

--
Stephen McDonald
http://jupo.org

Dan Lopez

unread,
Mar 17, 2012, 10:18:21 AM3/17/12
to Mezzanine Users

Thanks guys. Pretty straight forward. I just realized that it was my
"view on site" what was misleading as it takes the wrong url.

Amazing job, thanks for this.

On Mar 15, 7:58 pm, Stephen McDonald <st...@jupo.org> wrote:
> And since you mentioned the view for pages, here's the code for it if you'd
> like to get a better understanding:
>
> https://github.com/stephenmcd/mezzanine/blob/ce5b2df7af5a078d476081f8...
>
>
>
>
>
>
>
>
>
> On Fri, Mar 16, 2012 at 3:54 AM, Josh Cartmell <joshcar...@gmail.com> wrote:
> > Once you have set up your mezzanine project correctly pages you create in
> > the backend will automatically show up without modifying additional urls or
> > views.  As far as the template that is used for a specific page check out
> > this:
> >http://mezzanine.jupo.org/docs/content-architecture.html#page-templates
>
> > For example, if you create a rich text page it will by default be rendered
> > by pages/richtextpage.html.
>
> > Let us know if you still have questions.
>
> > Josh
>

Dan Lopez

unread,
Mar 17, 2012, 10:29:07 AM3/17/12
to Mezzanine Users
Just in case someone had the same problem as me and wonder why "view on site" takes you to the wrong URL, the answer is that you need to PROPERLY configure your sites section within the site menu to indicate the right domain name or IP.

D.
Reply all
Reply to author
Forward
0 new messages