django-templates Questions

3

Solved

I have created a template for the 500 HTTP error. I have inserted my template 500.html in: /project/ /project/templates/ /python2.5/ /python2.5/templates/ but I always get this error: Templat...
Chromate asked 12/5, 2010 at 20:13

3

Solved

I'm studying Django. I saw django tutorial part7 and I wanted to rename the name of the django admin page. So, I did it but it hasn't worked..... mysite/mysite/settings.py: TEMPLATES = [ { 'BACKE...
Mara asked 12/6, 2018 at 5:23

15

Solved

I want to use the Django template engine in my (Python) code, but I'm not building a Django-based web site. How do I use it without having a settings.py file (and others) and having to set the DJAN...
Konstantin asked 18/9, 2008 at 23:55

2

I have two IntegerChoices subclasses in one of my django Models that define ticket priorities for an api. I would like when the priority and statuses are rendered on my web page to show the label, ...

3

Solved

Currently suffering with a NoReverseMatch error with Django URL tag. Been following The definitive guide to Django, the Django doucmentation and searched around here and the internet urls: url(r'...
Nevermore asked 4/2, 2013 at 16:49

5

Solved

I would like to globally (through my entire site, admin and front-end) adjust the way dates and time are displayed to my likings, but I cannot figure out what is going on with the DATE_FORMAT, DATE...
Sousaphone asked 1/9, 2010 at 12:8

5

Solved

That: {{ wpis.entry.lastChangeDate|date:"D d M Y" }} gives me (why?): 2009-07-24 21:45:38.986156 And, I don't know how to skip fraction part... In my model, I have: addedDate = models....

6

Solved

I have a select field in the form and now I need to iterate over options in this field. {{ form.myselect }} gives me this: <select name="myselect" id="id_myselect"> <option value="" sel...
Crane asked 10/2, 2012 at 0:20

15

Solved

I'm new to Django and I'm trying to learn it through a simple project. I'm developing a system called 'dubliners' and an app called 'book'. The directory structure is like this: dubliners/book/ [in...
Leighannleighland asked 23/5, 2009 at 13:45

3

Solved

Let's say there are base_a.html, base_b.html, a.html, b.html, c.html. a.html extends base_a.html and b.html extends base_b.html. And c.html has to extend both base_a.html and base_b.html. It will...

8

Solved

I would like to provide the same content inside 2 different base files. So, I'm trying to do this: page1.html: {% extends "base1.html" %} {% include "commondata.html" %} page2....
Midlands asked 11/9, 2009 at 4:8

5

Solved

After running the runserver command I get the following error: TemplateSyntaxError at /questions/ Invalid block tag: 'trans' Does anybody know that what's the reason? This is my template syntax: ...
Dinerman asked 27/6, 2014 at 12:7

5

Solved

I have function which redirect to a URL. return redirect('/orders') The URL /orders has some context data which is being passed to it. I want to pass some additional data along with data from th...
Armyworm asked 2/1, 2016 at 8:34

19

Solved

When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}. Is there a way to access the...
Disharmony asked 18/11, 2008 at 13:52

7

Solved

Is it possible to override an existing Django Template Tag? or is it necessary to customize the template file and create a new Template Tag?
Grous asked 4/11, 2012 at 22:33

3

Solved

As "load" is far too generic for searching: What is the purpose of "load" and what does it do in this particular case? - in a template file, base_weblog.html, {% load weblog %}...
Slum asked 26/6, 2009 at 9:36

1

The doc says about @register.filter below: Custom filters are Python functions that take one or two arguments: The value of the variable (input) – not necessarily a string. The value of the argum...

4

Solved

i am trying to split the string in template using custom template filter. But i got an error TemplateSyntaxError at /job/16/ 'for' statements should use the format 'for x in y': for skill in form....
Bibulous asked 30/1, 2017 at 9:36

3

Solved

I'm trying to use a simple_tag and set a context variable. I'm using the trunk version of django: from django import template @register.simple_tag(takes_context=True) def somefunction(context, obj...

2

Solved

I can't change my Django admin template. I have followed the instructions from the Django documentation, and I have already checked StackOverflow questions. I have already made /templates/admin/my_...
Pleasance asked 8/2, 2019 at 10:54

12

Solved

How do I override an admin template (e.g. admin/index.html) while at the same time extending it (see https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs-replacing-an-admin-templa...
Bailment asked 5/7, 2011 at 13:59

13

Solved

How do I check if a variable is False using Django template syntax? {% if myvar == False %} Doesn't seem to work. Note that I very specifically want to check if it has the Python value False. This...
Hairpiece asked 19/11, 2010 at 21:2

8

Solved

I want to do the below list iteration in django templates: foo = ['foo', 'bar']; moo = ['moo', 'loo']; for (a, b) in zip(foo, moo): print a, b django code: {% for a, b in zip(foo, moo) %} {{ a ...
Descartes asked 10/3, 2010 at 9:51

8

Solved

I need to perform a filtered query from within a django template, to get a set of objects equivalent to python code within a view: queryset = Modelclass.objects.filter(somekey=foo) In my templat...
Award asked 21/10, 2008 at 23:55

2

Solved

i wanna Move user to admin panel site in Django using {% url 'admin' %} but the problem is my template in rendering in an app and i dont wanna rewrite url("^admin/",admin.site.urls) in project/site...
Unstudied asked 15/7, 2017 at 20:22

© 2022 - 2024 — McMap. All rights reserved.