请教一个关于template的问题
https://github.com/jhao104/django-blog/blob/19654755b11929b72cf5d0ce8930a8112fa351be/templates/blog/right.html#L116
你好,我没有完全拷贝你的项目,在我修改的时候发现这个right.html被index.html加载,但是view.py中index函数只返回了一个 return render(request, 'blog/index.html', {"article_list": article_list, "source_id": "index"})
这句return中并没有传递tag_list,那这个标签list是怎么加载的呢?
django-blog/templates/blog/right.html
Line 116 in 1965475
{% for tag in tag_list %} 你好,我没有完全拷贝你的项目,在我修改的时候发现这个right.html被index.html加载,但是view.py中index函数只返回了一个
return render(request, 'blog/index.html', {"article_list": article_list, "source_id": "index"})这句return中并没有传递tag_list,那这个标签list是怎么加载的呢?
这是自定义上下文,
代码在这里 https://github.com/jhao104/django-blog/blob/master/blog/context_processors.py
setting.py中注册 https://github.com/jhao104/django-blog/blob/19654755b11929b72cf5d0ce8930a8112fa351be/django_blog/settings.py#L68
感谢感谢,还是django学艺不精呀 :)
还有一个前端问题我不知道是不是Chrome的版本问题,我朋友可以正常显示,我的将页面滚动到一定位置rgba的透明度效果就看不出来了
没看出来啥问题,看图片是正常的
这样滚动到下面
上面部分本来就是这样透明的 :sweat_smile:
嗯嗯,对,前面的背景图上有个白色的透明的颜色,滚动到下面就只剩背景图了,透明白色颜色不见了,这是在哪里实现的?我想设置成不管怎么滚动都有白色透明的颜色,调了半天都不成功。。。