You should not do this from the standard Python shell, but via the
preconfigured Django one which is started with `manage.py shell`.
Also, DON'T SHOUT.
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and
THIS IS THE ERROR I ENCOUNTER WHEN I IMPORT DJANGO IN MY SHELL AND TRY TO
USE TEMPLATES THERE
from django import template
>>> t=template.Template('My name is {{ name }}.')
Traceback (most recent call last):
File "", line 1, in
File "django/template/base.py", line 123, in __init__
if set
Figured it out. Added this to my Model:
@property
def spacer(self):
return (25-len(str(self.team.name)))*' '
then in my template just added {{ team.spacer }}
On Jun 17, 7:17 pm, Chris McComas wrote:
> I have this as my template code:
>
> http://dpaste.com/555651/
>
> T
I have this as my template code:
http://dpaste.com/555651/
This is the HTML it is outputting, which makes sense. What I'm trying
to do is make it so the closing tag is right after the team name
and the whitespace from the ljust after it.
http://dpaste.com/555649/
--
You received this message
On Wed, Sep 23, 2009 at 12:40 PM, gustavo wrote:
>
> Hi people!!
>
> I need help trying to understand templates.
>
> Let me explain where I am. I have finished the django tutorial and I
> am assuming ( been right or wrong, I dont know) that the best thing to
> do is to use the template automatic
Hi people!!
I need help trying to understand templates.
Let me explain where I am. I have finished the django tutorial and I
am assuming ( been right or wrong, I dont know) that the best thing to
do is to use the template automatic generation. eg, I have a class
Galeria and to have a layout to i
Hello,
I am developing a personal website with django on google app engine.
The site works when I do not use templates. See here:
vrao423.appspot.com. But when I change try to use templates I separate
the base into files index and base.
Here is my base:
http://www.w3.org/
TR/html4/strict.dtd">
Hi Malcolm, Thank You very much for your reply. I am completely new to
python and django and trying to learn by using the code from reusuable
apps. I am going to look in to the link you have provided and try to
understand it. Back to the things you asked me,
Since I am having the problem in the p
On Sat, 2009-04-25 at 23:45 -0700, Prtamma wrote:
[...]
> I am using the following code
>
> {% if object.album_set.all %}
>
> {% for album in object.album_set.all %}
> {{ album.title }} li>
> {% endfor %}
>
> {% endif %}
>
> but nothing shows up, can anyone please correct m
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db.models import permalink
from django.contrib.auth.models import User
import datetime
class PersonType(models.Model):
title = models.CharField(max_length=100)
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db.models import permalink
from django.contrib.auth.models import User
import datetime
class PersonType(models.Model):
title = models.CharField(max_length=100)
11 matches
Mail list logo