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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:20:41+00:00 2026-05-22T17:20:41+00:00

In the below code i am trying to send a object with the request,Is

  • 0

In the below code i am trying to send a object with the request,Is this correct if so how to decode it in template

 def index(request):
      cat = Category.objects.filter(title="ASD")
      dict = {'cat' : cat}
       request.update('dict' : dict) 
          #or
       request.dict=dict;

And In the templates can we write the code as

     {% for obj in request.dict%}
          obj.title
     {% endfor %}

EDIT:
If i am calling function like

      def post_list(request, page=0, paginate_by=20, **kwargs):
        logging.debug("post_list")
        page_size = getattr(settings,'BLOG_PAGESIZE', paginate_by)
        return list_detail.object_list(
        request,
        queryset=Post.objects.published(),
        paginate_by=page_size,
        page=page,
        **kwargs
      )
  • 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-22T17:20:42+00:00Added an answer on May 22, 2026 at 5:20 pm

    You could do this, but why would you want to? Django has a simple, well-defined and well-documented way of passing data into templates – through the context. Why try and find ways to work around that?

    Edit after comment No. Again, Django has a perfectly good way of passing extra context into a generic view, via the extra_context parameter which again is well-documented.

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

Sidebar

Related Questions

I'm trying to use the code below to send messages via System.Net.Mail and am
Im trying to connect a Information object to many Customers (see code below) When
am trying to catch the inner exception for the smtpclass with this code below,
I'm trying to send a string via ftp using the code below but I'm
I am trying to use the below code to send email from asp.net(C#). using
In the code below I'm trying to load some images and put them in
So far i have got the code below which works lovely when trying an
In my code attached below, I'm trying to upload a file via ASP.NET. I
Can anyone tell how correct the following code below. Iam tryin to create a
In the below code sample, what does {0:X2} mean? This is from the reflection

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.