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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:06:56+00:00 2026-06-16T00:06:56+00:00

In the django’s action method, i give a parameter deletable_objects to the template, it

  • 0

In the django’s action method, i give a parameter deletable_objects to the template, it works. The code is

   deletable_objects, perms_needed, protected = get_deleted_objects(
            queryset, opts, request.user, self.admin_site, using)
   In the webpage, is shows as below:

enter image description here

In the above, the value of deletable_objects is [u'Task: <a href="/admin/ticket/task/3/">dasdsa</a>'], this is sent to {{ deleteable_object|unordered_list}} in template file as a variable, and i detect the web resource, it is as below:

enter image description here

But in additional, i set deletable_objects to [u'Task: <a href="/admin/ticket/task/3/">dasdsa</a>'] clearly and send it to the template . This time it is not working.
The web page is as below:

enter image description here

And i also detect its web resource as below:

enter image description here

My question is what is the differnce between the two kinds of scenario, the value of the parameter deletable_objects are the same (one is sent by variable and one is set value before sent by variable). In the web resource, the <li> </li> contents are the same, but why the result are different, from the highlight color or the picture we can see that.

Update
I set the {{ deleteable_object|safeseq|unordered_list}} to fix this issue, Thanks

  • 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-16T00:06:57+00:00Added an answer on June 16, 2026 at 12:06 am

    By default, django does not parse HTML in strings passed to the template; this is to prevent security problems by injected tags.

    There are various ways to get around this; one is to mark the string as safe in the template.

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

Sidebar

Related Questions

Django Endless Pagination works perfectly fine right until I use template inheritance. views.py: from
Django is sending the pre/post_delete signals if you are using the queryset.delete() method, but
Django is giving me some runtime warnings (on code that I didn't write). How
Django's template tags include an {% ifchanged %} test for use within loops to
Django documents give this example of associating extra data with a M2M relationship. Although
Django urlize docs say: The urlize filter also takes an optional parameter autoescape .
Django doesn't appear to have built in support for code coverage. Is therea defacto-standard
Django seems to be categorically rejecting ALL of my url template tags. Whenever I
Django docs say that Context object is a stack: from django.template import Context c
Django's date/time formats have a code for displaying the am/pm part of times as

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.