I recently built a django + vue project platform. When I was a CV engineer last night, I encountered a bug and the information returned on the page was wrong.
The error message on the web page is as follows: Uncaught SyntaxError: Unexpected token<
Solution: In the data layer, the operation method of a database is wrong. The original method only needs to be displayed. Currently, it needs to be combined with VUE to realize the real-time display function of the search box. The original variable cannot be traversed, so an error is reported.
Code like this
Original code: hrefs = DB_hrefs.obiject.all()
After modification: hrefs = list(DB_hrefs.object.all().values())
The problem can be solved after the modification is completed.
Similar Posts:
- [Solved] Search with xadmin_ Related field got invalid lookup: icontains
- OSError: [Errno 24] Too many open files [How to Solve]
- There was an internal API error [How to Solve]
- Mysql import Error Code: 2013 – Lost connection to MySQL server during query
- [Solved] Computed property “xxxx” was assigned to but it has no setter
- The differences between response. Getwriter(). Write() and response. Getwriter(). Print(), as well as pritwriter object and out object
- [Vue warn]: You may have an infinite update loop in a component render function.
- [Solved] document.onmousemove Error: Invalid or unexpected token
- The Usage of v-clock
- Error “parse” in grafana curve_ exception: Encountered…”