Any ideas on this question from about a month ago?
Thanks,
Neal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe
A follow-up question.
The following works [filename=baseMain.html]:
{% include templateHead %}
{% include templateBody1 %}
StartBodyBlock
{%block body%}
Default Block Body
{%endblock%}
EndBodyBlock
{% include templateBody2 %}
but if I combine templateBody1 and templateBody2 int
Maybe on Google App Engine there is no error line?
Here's an example of an "endif" insteaf of an "endifequal".
Neal
Traceback (most recent call last):
File "c:\Program Files\Google\google_appengine\google\appengine\ext
\webapp\__init__.py", line 501, in __call__
handler.get(*groups)
Fil
Let me add the reason for my question. The code posted first doesn't
work.
The "block body" is not being replaced.
But the following works fine (remove the ifequal/else/endifequal and
the Dijit.html template (which might also have a duplicate "block
body".
{% include "baseMainIncludeSimpleHea
It's not always a problem, but sometimes it's tricky to find the bad
"end" or mismatched Django tag.
Why doesn't Django give you the line number where the error is
encountered within the template?
Is this on the wishlist already?
TemplateSyntaxError: Invalid block tag: 'end'
In other words, the
Do include statements always "include" - or can they be subject to an
"if" statement like this:
{% ifequal menuStyle "dijit" %}
{% include "baseMainIncludeDijit.html" %}
{% else %}
{% include "baseMainIncludeSimpleHead.html" %}
{% include "baseMainIncludeSimpleBody1.html" %}
StartBodyB
Is there a keyword that will automatically put the URL of the current
page in the Django form?
Or do I have to do that in code and pass it to the form as a normal
user variable?
Here's what I'm trying to accomplish. I have a feedback form on a base
template. When the user clicks the feedback but
Yes, I am using Django forms. This is a variation of the question I
posted on the checkboxes.
My interim solution is to have a list of objects, set the Selected
value in Python, then put a for/loop in the Django form.
Neal
--~--~-~--~~~---~--~~
You received this m
Your correct, I'm so close to my issue, I assumed everybody would see
it.
A user fills out a form to request us to build a website for them.
We ask them what languages the would like - and we give them a list,
such as English, Spanish, Portuguese, etc...
The flag images are there just for looks.
Here's the last chunk of code. Before I display the template, I have
to reset the array with the languages stored in the database.
I now default every .Selected variable to False, and this code resets
the ones to True based on the database.
for dblanguage in session.languages:
for
Can someone advice if this is the optimal solution? I didn't get any
feedback yesterday - and must get this working.
I've been doing Python a short time, so not always sure the best
Pythonic approach...
I built an array of objects like this:
class Language(db.Model): #this is never stored in d
For simple input fields, I'm echoing back the data from database to
form like this:
Your Domain (example: JohnDoe.com)
If I don't put the "if" statement there, I get the value "None"
appearing, which is not desireable from a user's perspective. In this
case "session" is the name of database
Template/Form looks like this:
English:
Spanish:
Portuguese:
Database model defines column:
languages = db.StringListProperty() #stores multiple
languages
I stored data into Google/BigTable like this:
session.languages = self.request.get_all('language')
That part wor
13 matches
Mail list logo