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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:32:52+00:00 2026-06-04T15:32:52+00:00

I am on Google App Eninge with Django template. I want to truncate string

  • 0

I am on Google App Eninge with Django template.

I want to truncate string after a given number of chars, for example,
if a string (a title of a post) is too long, “This is a long long long long title”, I want to display the first few words, like this: “This is a long long …”

I have found some Django snippets here: http://djangosnippets.org/snippets/1259/ http://djangosnippets.org/snippets/763/

I want to know:

  1. If there is a simpler solution in Google App Engine python?

  2. How can I use this snippet http://djangosnippets.org/snippets/1259/
    in App Engine? I believe messing source code is not a good idea.

I need to truncate the string in Django Template, not in python source code. Something like this: {{ string|truncatesmart:50 }}

  • 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-04T15:32:53+00:00Added an answer on June 4, 2026 at 3:32 pm

    From your description of the problem, it appears it’s a situation which has already been specifically addressed by pure CSS. Take a look at the text-overflow:ellipsis property, which truncates a piece of text to fit in a desired width and puts a trailing ellipsis (…) like you mentioned. I hope that’ll be a far simpler solution here and you won’t have to ‘reinvent the wheel’.

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

Sidebar

Related Questions

Google App Engine - When I want to store a byte array as one
I'm writing a Google App Engine Go application. In it, I want to handle
Using Google App Engine and Django. Whenever I have a db.ReferenceProperty() inside a model
Google App Engine just gave me an error I don't understand. Given a module
Google app engine task queues have configuration as (example) <queue> <name>mail-queue</name> <rate>5/m</rate> <bucket-size>10</bucket-size> </queue>
I'm using Google App Engine and Django templates. I have a table that I
Google App Engine is a cloud computing architecture that supports java based web services
Google App Engine says Must authenticate first. while trying to deploy any app: me@myhost
Google App Engine doesn't support SSL for custom domains. Does this mean that it's
On Google App Engine to query the data store with Python, one can use

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.