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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:42:04+00:00 2026-06-10T11:42:04+00:00

I definitely doing something wrong but I’m not sure what! In my django project,

  • 0

I definitely doing something wrong but I’m not sure what!

In my django project, I created a folder called “templatetags”, in that folder I have:

__init__.py
tags.py

In tags.py:

from datetime import datetime
from django import template
register = template.Library()

@register.filter("timestamp")
def timestamp(value):
    try:
        return datetime.fromtimestamp(value)
    except AttributeError:
        return ''

In one of my templates I call:

{{record.date|timestamp|date:"D d M Y"}}

Yet when I run the template I get the following output error:

Exception Type: TemplateSyntaxError
Exception Value:    
Invalid filter: 'timestamp'

Can someone let me know what I”m doing wrong?

  • 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-10T11:42:06+00:00Added an answer on June 10, 2026 at 11:42 am

    2 things to check
    1. Is your app listed in INSTALLED_APPS
    2. did you load the custom tag in the file? i.e {% load tags %}

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

Sidebar

Related Questions

I'm definitely missing something. I have an XML file that stores HTML snippets, as
I believe that the rallytagpicker is definitely a useful component. However, I do not
This is probably something silly I'm missing but I'm definitely lost. I'm using .NET
I'm trying to calculate text width using jQuery. I'm not sure what, but I
I'm definitely not getting something here: I'm creating a simple function to replicate a
Okay, so I'm just learning about templates. Anyways, I'm probably (most definitely) doing something
Just learning C++, encountered an issue that i'm not really sure why the following
Okay this is definitely a n00b question but here goes. The way I understand
Using python to pick it some pieces so definitely a noob ? here but
sorry, I did not find something useful when searching google. Very basic question, mainly

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.