Re: Any tool to validate django templates?

2012-04-16 Thread Marcin Tustin
Thanks. Neither of those would help with my problem, which is that django
itself was refusing to parse my template.

My solution was to simply comment out regions, and re-instate them until
the error was once again detected.

On Mon, Apr 16, 2012 at 16:12, John Yeukhon Wong wrote:

> Would this help?
>
> http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-process
>
> I quite like the not-accepted-as-answer. Just go through your urls.
> Essentially, you have two types of possible template errors:
>
> 1. human errors (missing a close tag / mispell)
> 2. logic error
>
> For logic error, you are dealing with mostly logic tags  such as url tags
> or custom tags rendering problem. For example, does your {% url my_view id
> username %} actually works? are the variables passing to / from view are
> good for these tags? THis kind of error is not possible checked with going
> through all urls because u can't test possibility like that. THat has to be
> handled by unit test and integration (system) test.
>
>
> Good luck.
>
> On Sunday, April 15, 2012 12:42:14 PM UTC-4, Marcin wrote:
>>
>> Hi all,
>>
>> I've got a template that isn't parsing, but the error is the nondescript:
>> **TemplateSyntaxError: Could not parse the remainder: '"{%' from '"{%'
>>
>> Is there a tool that can help locate the source of the error?
>>
>> Marcin
>>
>> --
>> Marcin Tustin
>> Tel: 07773 787 105
>>
>>   --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Ml-zdg0y4WEJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Marcin Tustin
Tel: 07773 787 105

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Any tool to validate django templates?

2012-04-16 Thread Mario Gudelj
PyCharm does a very good job here when it comes to highlighting and error
detection in templates. Try it out.

On 17 April 2012 01:12, John Yeukhon Wong  wrote:

> Would this help?
>
> http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-process
>
> I quite like the not-accepted-as-answer. Just go through your urls.
> Essentially, you have two types of possible template errors:
>
> 1. human errors (missing a close tag / mispell)
> 2. logic error
>
> For logic error, you are dealing with mostly logic tags  such as url tags
> or custom tags rendering problem. For example, does your {% url my_view id
> username %} actually works? are the variables passing to / from view are
> good for these tags? THis kind of error is not possible checked with going
> through all urls because u can't test possibility like that. THat has to be
> handled by unit test and integration (system) test.
>
>
> Good luck.
>
> On Sunday, April 15, 2012 12:42:14 PM UTC-4, Marcin wrote:
>>
>> Hi all,
>>
>> I've got a template that isn't parsing, but the error is the nondescript:
>> **TemplateSyntaxError: Could not parse the remainder: '"{%' from '"{%'
>>
>> Is there a tool that can help locate the source of the error?
>>
>> Marcin
>>
>> --
>> Marcin Tustin
>> Tel: 07773 787 105
>>
>>   --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Ml-zdg0y4WEJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Any tool to validate django templates?

2012-04-16 Thread John Yeukhon Wong
Would this help?
http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-process

I quite like the not-accepted-as-answer. Just go through your urls. 
Essentially, you have two types of possible template errors:

1. human errors (missing a close tag / mispell)
2. logic error

For logic error, you are dealing with mostly logic tags  such as url tags 
or custom tags rendering problem. For example, does your {% url my_view id 
username %} actually works? are the variables passing to / from view are 
good for these tags? THis kind of error is not possible checked with going 
through all urls because u can't test possibility like that. THat has to be 
handled by unit test and integration (system) test.


Good luck. 

On Sunday, April 15, 2012 12:42:14 PM UTC-4, Marcin wrote:
>
> Hi all,
>
> I've got a template that isn't parsing, but the error is the 
> nondescript: TemplateSyntaxError: Could not parse the remainder: '"{%' from 
> '"{%'
>
> Is there a tool that can help locate the source of the error?
>
> Marcin
>
> -- 
> Marcin Tustin
> Tel: 07773 787 105
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Ml-zdg0y4WEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Any tool to validate django templates?

2012-04-16 Thread william ratcliff
Wing IDE also highlights templates.
On Apr 16, 2012 3:16 AM, "Matt Schinckel"  wrote:

> Generally, I just use syntax highlighting in my text editor: that usually
> helps me find errors.
>
> TextMate has a nice HTML (Django Template) mode.
>
> Matt.
>
>
> On Monday, April 16, 2012 2:12:14 AM UTC+9:30, Marcin wrote:
>>
>> Hi all,
>>
>> I've got a template that isn't parsing, but the error is the nondescript:
>> **TemplateSyntaxError: Could not parse the remainder: '"{%' from '"{%'
>>
>> Is there a tool that can help locate the source of the error?
>>
>> Marcin
>>
>> --
>> Marcin Tustin
>> Tel: 07773 787 105
>>
>>   --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/IOteWda5w0UJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Any tool to validate django templates?

2012-04-16 Thread Matt Schinckel
Generally, I just use syntax highlighting in my text editor: that usually 
helps me find errors.

TextMate has a nice HTML (Django Template) mode.

Matt.


On Monday, April 16, 2012 2:12:14 AM UTC+9:30, Marcin wrote:
>
> Hi all,
>
> I've got a template that isn't parsing, but the error is the 
> nondescript: TemplateSyntaxError: Could not parse the remainder: '"{%' from 
> '"{%'
>
> Is there a tool that can help locate the source of the error?
>
> Marcin
>
> -- 
> Marcin Tustin
> Tel: 07773 787 105
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/IOteWda5w0UJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Any tool to validate django templates?

2012-04-15 Thread Marcin Tustin
Hi all,

I've got a template that isn't parsing, but the error is the
nondescript: TemplateSyntaxError: Could not parse the remainder: '"{%' from
'"{%'

Is there a tool that can help locate the source of the error?

Marcin

-- 
Marcin Tustin
Tel: 07773 787 105

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.