エラー:このエラーが表示される理由は実際に私が得ることはありません()ベース10と:「n」を
/N /続い/時とValueError、私はint型()とフロートを使用して試してみました()しかし、何が動作しているようです
views.py
def followed(request, follow_to):
return render(request, "test.html",{'following':Following.objects.get(follow_to=follow_to),
'selfieList':Selfie.objects.filter(selfie_user=follow_to),})
テンプレート
{% for f in following %}
<a href="{% url 'followed' f.follow_to %}">{{f.follow_to}}</a> <br>
{% endfor %}
urls.py
url(r'^followed/(?P<follow_to>[-\w]+)/$', followed, name='followed'),
models.py
class Following(models.Model):
follow_from = models.ForeignKey("auth.User",related_name='from_person')
follow_to = models.ForeignKey("auth.User", related_name='to_person')
date_follow = models.DateTimeField(auto_now=True)
def __unicode__(self):
return unicode(self.follow_from)
def __str__(self):
どのラインがエラーになりますか? – Yaelle
[Django無効なリテラル(int()の基数が10の可能性があります]の可能な複製)(http://stackoverflow.com/questions/23394545/django-invalid-literal-for-int-with-base-10) – an0o0nym
あなたが要求を提出しているフォームのコード? –