|
List Info
Thread: (Newbie) TemplateSyntaxError in admin panel
|
|
| (Newbie) TemplateSyntaxError in admin
panel |

|
2007-12-20 02:11:31 |
Hello,
I'm going through the Django tutorial for Django 0.9.6 on
Windows
Vista. Everything is going smoothly, and I'm following the
tutorial to
a T; except when I'm in my admin site (step 2 of the
tutorial),
clicking any of the links (Groups/Users/Sites/Polls), I get
a
TemplateSyntaxError, appended below. Any ideas on how to fix
this? The
only thing I did outside of the tutorial instructions was to
follow
the fix described here because of an apparent flaw with
0.96.:
http://forums.devshed.com/showpost.php?p=1856484
&postcount=2
Thanks!
Rex
===============================
TemplateSyntaxError at /admin/polls/poll/
Invalid arguments to 'cycle': ['cycle', "'row1'",
"'row2'"]
Request Method: GET
Request URL: http://127.0.
0.1:8000/admin/polls/poll/
Exception Type: TemplateSyntaxError
Exception Value: Invalid arguments to 'cycle': ['cycle',
"'row1'",
"'row2'"]
Exception Location:
C:Python25libsite-packagesdjangotemplate
defaulttags.py in cycle, line 434
Template error
In template
C:Python25libsite-packagesdjangocontribadmin
templatesadmin/change_list_results.html, error at line 13
Invalid arguments to 'cycle': ['cycle', "'row1'",
"'row2'"]
3 <thead>
4 <tr>
5 {% for header in result_headers %}<th{{
header.class_attrib }}>
6 {% if header.sortable %}<a href="{{ header.url
}}">{% endif %}
7 {{ header.text|capfirst }}
8 {% if header.sortable %}</a>{% endif
%}</th>{% endfor %}
9 </tr>
10 </thead>
11 <tbody>
12 {% for result in results %}
13 <tr class="{% cycle 'row1' 'row2' %}">{%
for item in result %}
{}{% endfor %}</tr>
14 {% endfor %}
15 </tbody>
16 </table>
17 {% endif %}
18
===============================
--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: (Newbie) TemplateSyntaxError in
admin panel |

|
2007-12-23 12:50:05 |
Hi,
Is there any solution to the below described problem? I
still haven't
been able to get it to work.
Best,
Rex
On Dec 20, 3:11 am, Rex Eastbourne <rex.eastbou... gmail.com> wrote:
> Hello,
>
> I'm going through the Django tutorial for Django 0.9.6
on Windows
> Vista. Everything is going smoothly, and I'm following
the tutorial to
> a T; except when I'm in my admin site (step 2 of the
tutorial),
> clicking any of the links (Groups/Users/Sites/Polls), I
get a
> TemplateSyntaxError, appended below. Any ideas on how
to fix this? The
> only thing I did outside of the tutorial instructions
was to follow
> the fix described here because of an apparent flaw with
0.96.:http://forums.devshed.com/showpost.php?p=1856484
&postcount=2
>
> Thanks!
>
> Rex
>
> ===============================
> TemplateSyntaxError at /admin/polls/poll/
> Invalid arguments to 'cycle': ['cycle',
"'row1'", "'row2'"]
> Request Method: GET
> Request URL: http://127.0.
0.1:8000/admin/polls/poll/
> Exception Type: TemplateSyntaxError
> Exception Value: Invalid arguments to 'cycle':
['cycle', "'row1'",
> "'row2'"]
> Exception Location:
C:Python25libsite-packagesdjangotemplate
> defaulttags.py in cycle, line 434
> Template error
>
> In template
C:Python25libsite-packagesdjangocontribadmin
> templatesadmin/change_list_results.html, error at
line 13
> Invalid arguments to 'cycle': ['cycle',
"'row1'", "'row2'"]
> 3 <thead>
> 4 <tr>
> 5 {% for header in result_headers %}<th{{
header.class_attrib }}>
> 6 {% if header.sortable %}<a href="{{
header.url }}">{% endif %}
> 7 {{ header.text|capfirst }}
> 8 {% if header.sortable %}</a>{% endif
%}</th>{% endfor %}
> 9 </tr>
> 10 </thead>
> 11 <tbody>
> 12 {% for result in results %}
> 13 <tr class="{% cycle 'row1' 'row2'
%}">{% for item in result %}
> {}{% endfor %}</tr>
> 14 {% endfor %}
> 15 </tbody>
> 16 </table>
> 17 {% endif %}
> 18
> ===============================
--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: (Newbie) TemplateSyntaxError in
admin panel |

|
2007-12-23 14:18:19 |
|
On Dec 23, 2007 1:50 PM, Rex Eastbourne < rex.eastbourne gmail.com">rex.eastbourne gmail.com> wrote:
Hi,
Is there any solution to the below described problem? I still haven't been able to get it to work.
Best, Rex
Somehow it seems you have gotten recent templates from SVN mixed in with code from 0.96. Details below.
On Dec 20, 3:11 am, Rex Eastbourne < rex.eastbou... gmail.com">rex.eastbou... gmail.com> wrote: > Hello, > > I'm going through the Django tutorial for Django
0.9.6 on Windows > Vista. Everything is going smoothly, and I'm following the tutorial to > a T; except when I'm in my admin site (step 2 of the tutorial), > clicking any of the links (Groups/Users/Sites/Polls), I get a
> TemplateSyntaxError, appended below. Any ideas on how to fix this? The > only thing I did outside of the tutorial instructions was to follow > the fix described here because of an apparent flaw with 0.96.:http://forums.devshed.com/showpost.php?p=1856484&postcount=2
> I';d guess following these instructions is how you somehow got current SVN templates mixed in with 0.96 code.
> Thanks! &g t; > Rex > > =============================== > TemplateSyntaxError at /admin/polls/poll/ > Invalid arguments to 'cycle': ['cycle', "';row1'", "';row2'"]
> Request Method: GET > Request URL: http://127.0.0.1:8000/admin/polls/poll/ > Exception Type: TemplateSyntaxError
> Exception Value: Invalid arguments to 'cycle': ['cycle', "';row1'", > "';row2'"] > Exception Location: C:Python25libsite-packagesdjangotemplate
> defaulttags.py in cycle, line 434 > Template error >
> In template C:Python25libsite-packagesdjangocontribadmin > templatesadmin/change_list_results.html, error at line 13 > Invalid arguments to 'cycle': ['cycle', "';row1'", "';row2'"]
> 3 <thead> > 4 <tr> > 5 {% for header in result_headers %}<th{{ header.class_attrib }}> > 6 {% if header.sortable %}<a href="{{ header.url }}">{% endif %}
> 7 {{ header.text|capfirst }} > 8 {% if header.sortable %}</a>{% endif %}</th>{% endfor %} > 9 </tr> > 10 </thead> > 11 <tbody>
> 12 {% for result in results %} > 13 <tr class="{% cycle 'row1' 'row2' %}">{% for item in result %}
You need to get either all the proper 0.96 versions of the templates, or use the code that goes with your post-0.96 version of the template files.
Karen
--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to django-users-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---
|
[1-3]
|
|