could not parse the remainder

Как устранить ошибку в шаблоне?

Could not parse the remainder: ‘,’ from »group’,’

Если нужны больше деталей по ошибке, предоставлю, сам не могу врубиться.

i want to compare num and <>, but why it is not work? And i got an error

I want to make the pagination have effect: pre > next

I my code can run, can it make this effect? thanks:D

3 Answers 3

Inside a <% %>tag, variables aren’t surrounded by << . Try this:

Also, it looks like your two comparisons can be joined with an else:

I got this error when I forgot the » around the path to a static file

This gave the error:

This fixed the error:

Not the answer you’re looking for? Browse other questions tagged django django-templates or ask your own question.

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2019.11.15.35459

I am getting this issue when I type localhost:8000/admin/ .

`TemplateSyntaxError: Could not parse the remainder: ‘:password_change’ from ‘admin:password_change’. The syntax of ‘url’ changed in Django 1.5, see the docs.

Here’s part of my settings.py :

Did I do anything wrong?

I am pasting the output of grep as per request:

1 Answer 1

This error usually means you’ve forgotten a closing quote somewhere in the template you’re trying to render. For example: <% url 'my_view %>(wrong) instead of <% url 'my_view' %>(correct). In this case it’s the colon that’s causing the problem. Normally you’d edit the template to use the correct <% url %>syntax.

But there’s no reason why the django admin site would throw this, since it would know it’s own syntax. My best guess is therefore that grapelli is causing your problem since it changes the admin templates. Does removing grappelli from installed apps help?

Оцените статью