django2.0,python 3.6
都不需要改,直接超链接就可以了
<a href="/blog/article/{{art.id}}">{{art.title}}</a>
2.根目录url.py中的namespace=None
试了好几遍才修改好的。
都不需要改,直接超链接就可以了
<a href="/blog/article/{{art.id}}">{{art.title}}</a>
2.根目录url.py中的namespace=None
试了好几遍才修改好的。
2018-05-11
妹的,对自己简直太无语,objects写成objests,检查了n遍,,,,,,,,,,,,,,,,,,,真的
2018-05-11
TypeError at /blog/edit/
edit_page() missing 1 required positional argument: 'article_id'
Request Method: GET
Request URL: http://127.0.0.1:8000/blog/edit/
Django Version: 2.0.5
Exception Type: TypeError
Exception Value:
edit_page() missing 1 required positional argument: 'article_id'
求解
edit_page() missing 1 required positional argument: 'article_id'
Request Method: GET
Request URL: http://127.0.0.1:8000/blog/edit/
Django Version: 2.0.5
Exception Type: TypeError
Exception Value:
edit_page() missing 1 required positional argument: 'article_id'
求解
2018-05-09
# 报错还可以运行正确
import blog.views as bv
我也是醉了
import blog.views as bv
我也是醉了
2018-05-09
修改一下@weibo_Ins_宋_0 的答案:
from django.http import HttpResponseRedirect
from django.urls import reverse
return HttpResponseRedirect(reverse('index'))
from django.http import HttpResponseRedirect
from django.urls import reverse
return HttpResponseRedirect(reverse('index'))
2018-05-06