Top "Django-templates" questions

Questions about the template engine of Django, which is intended to separate the presentation of a document from its data.

Django templates - split string to array

I have a model field, which stores a list of URLs (yeah, I know, that's wrong way) as url1\nurl2\…

django django-templates django-template-filters
Django template tag to truncate text

Django has truncatewords template tag, which cuts the text at the given word count. But there is nothing like truncatechars. …

django django-templates
Django - Simple custom template tag example

I have users, videos, topics, criterias and ratings A video has a topic A topic has criterias A user can …

django django-models django-templates
Django: get URL of current page, including parameters, in a template

Is there a way to get the current page URL and all its parameters in a Django template? For example, …

django django-urls django-templates
django template system, calling a function inside a model

I want to call a function from my model at a template such as: class ChannelStatus(models.Model): .............................. .............................. def get_…

python django django-models django-templates
Need to convert a string to int in a django template

I am trying to pass in url parameters to a django template like this... response = render_to_string('persistConTemplate.html', …

django django-templates
AngularJS with Django - Conflicting template tags

I want to use AngularJS with Django however they both use {{ }} as their template tags. Is there an easy way …

javascript django django-templates angularjs
Make the first letter uppercase inside a django template

I am pulling a name from a database which is stored as myname. How do I display this inside a …

django django-templates
django - what goes into the form action parameter when view requires a parameter?

This is what I have: myview.py with a view that takes a parameter user: def myview(request, user): form = …

django django-templates django-forms django-views
Is it possible to pass query parameters via Django's {% url %} template tag?

I'd like to add request parameters to a {% url %} tag, like ?office=foobar. Is this possible? I can't find anything …

django django-templates