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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:15:12+00:00 2026-05-20T02:15:12+00:00

{% gen_aws "hello" %} In my file, I do this: # I want to

  • 0
{% gen_aws "hello" %}

In my file, I do this:

# I want to add "goodbye" to every word passed to this tag.
@register.tag(name="gen_aws")
def gen_aws(s):
    return s + "goodbye"

The .py file is fine…I’m including everything fine. I have other template filters in there that work fine. But then I added this in that file, and this template tag doesn’t work.

  • 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-20T02:15:13+00:00Added an answer on May 20, 2026 at 2:15 am

    Your description of “doesn’t work” is not very accurate (to be exact it doesn’t exist). But I guess you get an error because the tag is not found.

    The documentation clearly states that you need a “templatetags” module in your app, with a submodule like “mytags”, for example. Then you have to include these tags in each template you want to use them. You can do that with {% load mytags %}.

    The “mytags” module then contains your “gen_aws” tag.

    EDIT: The error “gen_aws() takes exactly 1 argument (2 given)” occurs because normal tags can parse their parameter in a very customized way. Therefore they get the arguments “parser” and “token”. In your case, a so-called simple tag should be enough – Django then automatically parses parameters for you and passes them as Python values. So just replace @register.tag by @register.simple_tag.

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

Sidebar

Related Questions

I want to start a gen_server that additionally, will perform one action every minute.
I want to auto gen some DTOs from some of my existing objects, I
Let's say I have several versions of a gen_event handler and want to change
UserGuide of scalacheck project mentioned sized generators. The explanation code def matrix[T](g:Gen[T]):Gen[Seq[Seq[T]]] = Gen.sized
I am writing a gen_server which I want to hold an ets table as
All: def a(p): return p+1 def gen(func, k=100): l= [] for x in range(k):
I have those two sources: (ns odo.IComplex) (gen-interface :name odo.IComplex :methods [ [getReal []
I followed this tutorial to configure an application (generated by seam-gen) to use eclipselink
I'm looking at only latest gen browsers: IE9 (haven't really looked into this once
When a particular message is received by my gen_event manager process, I want it

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.