Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

43.静态资源和Ajax请求.md: 好评”和“差评”功能映射对应的URL写错; 46.报表和日志.md:生成echarts 路由写错 #496

Open
moon-zhangyue opened this issue Mar 1, 2020 · 2 comments

Comments

@moon-zhangyue
Copy link

@moon-zhangyue moon-zhangyue commented Mar 1, 2020

1. path('praise/', views.prise_or_criticize), path('criticize/', views.prise_or_criticize),
这里面的方法名和方法 def praise_or_criticize(request):没对应上
赞应该是praise
2.urlpatterns = [ # 此处省略上面的代码 path('teachers_data/', views.export_teachers_excel), # 此处省略下面的代码 ]
这里export_teachers_excel 应该是get_teachers_data
然后缺一个展示图表的路由

@MrLiuWinter
Copy link

@MrLiuWinter MrLiuWinter commented Mar 3, 2020

前面没有vote,后面直接用的,然后static之类的,小白直接蒙了
大佬指点一下

@moon-zhangyue
Copy link
Author

@moon-zhangyue moon-zhangyue commented Mar 3, 2020

前面没有vote,后面直接用的,然后static之类的,小白直接蒙了
大佬指点一下

他这个是又起了一个投票应用-起名字叫poll2,admin.py引入的那个就是
from poll2.forms import UserForm from poll2.models import Subject, Teacher
就是创建的这个投票应用,UserForm这个类还没有 注释了就好了.
static就是放静态文件的文件夹,他放在了启动文件manage.py那层,图片名字也改了....自己对应好了就行了

@moon-zhangyue moon-zhangyue changed the title 43.静态资源和Ajax请求.md 好评”和“差评”功能映射对应的URL写错 43.静态资源和Ajax请求.md 好评”和“差评”功能映射对应的URL写错; Mar 15, 2020
@moon-zhangyue moon-zhangyue changed the title 43.静态资源和Ajax请求.md 好评”和“差评”功能映射对应的URL写错; 43.静态资源和Ajax请求.md: 好评”和“差评”功能映射对应的URL写错; 46.报表和日志.md:生成echarts 路由写错 Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.