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 8221353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:53:18+00:00 2026-06-07T13:53:18+00:00

I am creating an application to display articles. In my model, I have a

  • 0

I am creating an application to display articles. In my model, I have a TextField that will contain the content of the article.

Now I would like to be able to render another application within my article. Let say I have a poll application and I would like to display a poll in the middle of the article. How can I do that ?

I tried by putting a {% render_poll 42 %} within the post but, as expected, it just display that within the generated page.

Should I create some kind of tag (like let say [poll=42]) and parse it before displaying the rendered html page ? (I use the markdown library, maybe I could extend it.) How can I do that to stay in a nice “django friendly” way ? I want that, when in the admin panel, I can easily insert poll (or other apps) within an article.

  • 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-06-07T13:53:23+00:00Added an answer on June 7, 2026 at 1:53 pm

    You could compile the TextField string as a template. Ie.:

    from django.db import models
    from django.template import Template, Context
    
    
    class YourModel(models.Model):
        body = models.TextField()
    
        def render_body(self, context=None):
            template = Template(self.body)
            context = context or {}
            context['object'] = self
            return template.render(Context(context))
    

    Then in the actual template, you could use {{ your_model.render_body }} rather than {{ your_model.body }}.

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

Sidebar

Related Questions

I'm creating a splash screen that will display while my Android application loads. I'd
I am creating a web application that will display the dates of various events
Im creating application that will display remote page on the UIWebView using local images
We’re creating a web application that will display contour areas as bitmaps in a
I'm creating an XPages application that will display a view that lists all the
I'm creating a application that will fetch data from an SQLite database and display
When creating a web application that some how displays the display of a unique
i'm Creating an application that will be working off a User table, the user
I'm creating Django application, with forum-like thingy. One of the views should display list
I am creating a Swing application with a JEditorPane that should display an HTML

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.