Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3216892
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:20:51+00:00 2026-05-17T15:20:51+00:00

I would like to display some content located in my models in some of

  • 0

I would like to display some content located in my models in some of my template pages.

I am using django-page cms

In the documentation views are not used to display content. Instead ready made template tags are used.

http://packages.python.org/django-page-cms/display-content.html

I do not understand a word of this. Please Bear with me I am new.

All I want to do is display some info located in my models inside a template this manner..

   {% if latest_news_list %}          
      {% for news in latest_news_list %} 
           <li><h3>{{ news.title }}</h3></li>
           <li><p>{{ news.body }}</p></li>
      {% endfor %}

Since views are not used I cannot use if latest_news_list.
I need to somehow get my models to display in the templates using django-page cms and NOT regular views. The documentation states to use some kind of template tag for this.

Could somebody please explain to me how to do this.
And a clear concise explanation of the following ready-made template tags would also be appreciated…
* get_content
* show_content
* get_page
* show_absolute_url

taken from.http://packages.python.org/django-page-cms/display-content.html

I need to display info contained using the following models in the manner I have highlighted above. Thank you very much for your help. my models are as follows.

class Body(models.Model):
    type = models.ForeignKey(Content)
    title = models.CharField(max_length=100)
    published = models.DateTimeField(default=datetime.now)
    body = tinymce_models.HTMLField("Main content")

As I have stated I am very new to this please make explanations as simple as possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:20:52+00:00Added an answer on May 17, 2026 at 3:20 pm

    The template tags you mentioned are supposed to display content coming from the cms. If you want to include data coming from your app, you should see this sectionlink text.

    def extra_context():
        from myapp.models import Body
        items = Body.object.all()
        return {'items': items}
    
    PAGE_EXTRA_CONTEXT = extra_context
    
    
    {% if items %}
        <ul>
            {% for item in items %}
            <li>{{ item.title }} </li>
            {% endfor %}
        <ul>
    {% endif %}
    

    Or, if you want to use your app’s view, see this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to display on my main page some articles, but only those
I would like to display an exchange calendar on our intranet using SharePoint or
We would like to display text and images of an web page in higher
I would like to display a catergory page as my homepage rather than a
I would like to display a directory structure using Gtk# widgets through F#, but
I have some html content stored in a database field. I would like trusted
I would like to display popovers with UITableView 's as content (this works) on
I display some content in my view using this: <%= Html.Encode(Model.synopsis) %> The content
I'd like to use a UITableViewController to display some static content. Is it possible
I am writing an article in LaTeX and I would like to display some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.