已采纳回答 / 慕粉18623041752
                                
                                                            导入 redirect:from django.shortcuts import render, redirect使用redirect:return redirect('/blog/index')
                            
                        
                        2017-05-25
                
            
                                最新回答 / 汤_ying
                                
                                                            这个问题跟项目配置文件有关系。 比如你的工程名叫myblog, 那么工程目录下有个隐藏的目录 .idea ,在该目录下找到myblog.iml配置文件,编写html代码时如果能自动补全,那么该配置文件中应该包含有如下内容:<component name="TemplatesService"><option name="TEMPLATE_CONFIGURATION" value="Jinja2" /><option name="TEMPLATE_FOLDERS">  &l...
                            
                        
                        2017-05-22
                
            
                                已采纳回答 / 请叫我百度
                                
                                                            有可能是后台代码没取到数据,看看你的views.py中articles = models.Article.objects.all()写对这么,包括render()中的三个参数 ,最后一个参数是{'articles':articles}  名字一定要和前台保持一致。
                            
                        
                        2017-05-20