TemplateSyntaxError at /cart/, Invalid block tag: '"cart:cart_remove"', expected 'endwith'
<p>I'm doing the webshop following the code in the book "Django by Example". I tried Google and searches in Stackoverflow but I did not find answers to this problem. </p>

<p>The product list page and the product detail page work fine but when I try to add items to the cart, the browser says: 
TemplateSyntaxError at /cart/, Invalid block tag: '"cart:cart_remove"', expected 'endwith'.</p>

<p>Here is a screenshot of a part of the error page:
<a href="http://i.stack.imgur.com/FhHJC.png" rel="nofollow">error page code lines, maybe the picture is more clear</a>. Here you can also see the code of the error page:</p>

<pre><code>23                  {% with product=item.product %}
24                      &lt;tr&gt;
25                          &lt;td&gt;
26                              &lt;a href="{{ product.get_absolute_url }}"&gt;
27                                  &lt;img src="{% if product.image %}{{ product.image.url
28                                  }}{% else %}{% static "img/no_image.png" %}{% endif %}"&gt;
29                              &lt;/a&gt;
30                          &lt;/td&gt;
31                          &lt;td&gt;{{ product.name }}&lt;/td&gt;
32                          &lt;td&gt;{{ item.quantity }}&lt;/td&gt;
33  
                              &lt;td&gt;&lt;a href="
      {% "cart:cart_remove" product.id %}
      "&gt;Remove&lt;/a&gt;&lt;/td&gt;


34                          &lt;td class="num"&gt;${{ item.price }}&lt;/td&gt;
35                          &lt;td class="num"&gt;${{ item.total_price }}&lt;/td&gt;
36                      &lt;/tr&gt;
37                  {% endwith %}
</code></pre>

<p>I checked the code. As you can see below, I have the endwith tag so I don't understand why it gives me that kind of an error. Pycharm was complaining about the " so I changed it to ' for the  'no_image.png' and 'cart:cart_remove'. However, I tried to run the website after replacing ' with ", but it gives me the same error. </p>

<p>Maybe this problem is related. Pycharm is complaining about the shop models at cart\view.py and underlines it with red:</p>

<pre><code>from shop.models import Product
</code></pre>

<p>Pycharm says Unresolved reference 'shop'. </p>

<p>Also the shop\view.py has a similar problem with this:</p>

<pre><code>from cart.forms import CartAddProductForm
</code></pre>

<p>I had some similar unresolved reference problem earlier but it seemed to have disappeared by itself somehow.</p>

<p>The problem is not with <code>endwith</code>, but with the tag that is highlighted. <code>"cart:cart_remove"</code> is not a tag; I expect you meant to use <code>{% url "cart:cart_remove" ... %}</code> there.</p>

python django