problem description
Debug
related codes
class OrgView(View):
"""
"""
def get(self, request):
-sharp
all_orgs = CourseOrg.objects.all()
org_nums = all_orgs.count()
-sharp
all_citys = CityDict.objects.all()
-sharp
try:
page = request.GET.get("page", 1)
except PageNotAnInteger:
page = 1
p = Paginator(all_orgs, 2, request=request)
orgs = p.page(page) -sharp
return render(request, "org_list.html", {
"all_orgs": orgs,
"all_citys": all_citys,
"org_nums": org_nums
})
what result do you expect? What is the error message actually seen?
according to reason, this mistake should not have occurred. Is it Pycharm"s BUG??
paste the version of Pycharm:
PyCharm 2018.1.4 (Professional Edition)
Build-sharpPY-181.5087.37, built on May 24,2018
Licensed to PyCharm Evaluator
Expiration date: August 19,2018
JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
I hope Daniel will give me some advice.