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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:41:24+00:00 2026-06-13T04:41:24+00:00

I have read this , but I have one more question: how I can

  • 0

I have read this, but I have one more question: how I can rename country.grouper in the template? I ‘group’ week days – week_days.grouper, its like 1, 2, 3 etc. But I want change it in the template – Sunday, Monday etc. How to do it?

  • 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-13T04:41:25+00:00Added an answer on June 13, 2026 at 4:41 am

    A custom template tag should help you out here. It has to be put into a file e.g. my_custom_filters.py in your app in a folder called templatetags:

    from django import template
    register = template.Library()
    
    def get_weekday(value):
        """returns the weekday for the given number - 0 indexed"""
        wd_list = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
        return wd_list[int(value)]
    

    This custom filter will be used like this:

    {% load my_custom_filters %}
    
    {% regroup day by weekdays as weekday_list %}
    
    <ul>
    {% for day in weekday_list %}
        <li>{{ day.grouper|get_weekday }}
        <ul>
            {% for item in day.list %}
              <li>{{ item.name }}: {{ item.population }}</li>
            {% endfor %}
        </ul>
        </li>
    {% endfor %}
    </ul>
    

    If you are using a date object could use the build-in date template tag to convert a date to the corresponding weekday:

    {% regroup day by weekdays as weekday_list %}
    
    <ul>
    {% for day in weekday_list %}
        <li>{{ day.grouper|date:"w" }}
        <ul>
            {% for item in day.list %}
              <li>{{ item.name }}: {{ item.population }}</li>
            {% endfor %}
        </ul>
        </li>
    {% endfor %}
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just read this question I have same problem too, but I wanted more.
I have read this question but it's not quite what I was looking for.
I have read this question and the simple and clear answer but it's not
I have read that you can do it, but would this really improve performance
I have read several forums but can't find the solution to this. int sIndex
I have read several questions regarding this but I fear they may be out
I have read a bunch of forums on this but none have solved my
I have read a lot about this issue but mine still seems to be
I have read a lot of related topics here regarding this problem but I
I have read the other threads regarding this same problem but I still don't

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.