0
我正在爲我的項目使用coleifer/Django-Relationships包。我一直在努力工作。Django Relationships- TemplateSyntaxerror
我在用戶個人資料模板中包含了模板'relationship_add.html',這樣當用戶找到另一個用戶時,如果兩個用戶都沒有關注對方,用戶就可以輕鬆點擊關注按鈕遵循對方。
包括用戶模板後型材模板:
{% include 'relationships/relationship_add.html' %}
我在/型材/ picomon越來越TemplateSyntaxError/
RelationshipStatus not found
Request Method: GET
Request URL: http://127.0.0.1:8000/profiles/picomon/
Django Version: 1.3.1
Exception Type: TemplateSyntaxError
Exception Value:
RelationshipStatus not found
Exception Location: build\bdist.win32\egg\relationships\templatetags\relationship_tags.py in render, line 32
Python Executable: C:\Python27\python.exe
Python Version: 2.7.2
Template error
In template c:\python27\scripts\myweb\templates\relationships\relationship_add.html, error at line 9
下面是關係/ relationship_add.html代碼
{% load relationship_tags %}
{% if request.user != profile.user %}
{# decide whether or not the current user is following this user #}
{% if_relationship request.user profile.user "following" %}
{# they are following them, so show a "remove" url #}
<a href="{{ profile.user|remove_relationship_url:"following" }}">Unfollow</a>
{% else %}
{# they are not following them, so show a link to start following #}
<a href="{{ profile.user|add_relationship_url:"following" }}">Follow</a>
{% endif_relationship %}
{% else %}
<p>This is you!</p>
{% endif %}
我會做什麼調整來完成這項工作?請帶我通過請。
我已經嘗試了所有這些。我甚至調整它,但沒有成功!任何讓用戶相互關注的其他軟件包?非常感謝! – picomon 2012-02-19 14:23:02