我想創建一個自定義配置文件,以將其他字段添加到django-registration。這裏是我的代碼至今 - 在models.py from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.ForeignKey
我使用的是django-profiles和django.contrib.comments,我試圖在其個人資料中顯示特定用戶的所有評論。 這是使用django-profiles的默認profile_detail視圖。 我已經試過這兩種方法並沒有被返回的任何對象(儘管確實存在匹配該查詢對象): {% for comment in profile.user.comment_set.all %}
和