当我尝试访问http://localhost:8000/api/goal/?format=json时出现以下错误:
ImproperlyConfigured at /api/goal/
The included urlconf <property object at 0x262bb50> doesn't have any patterns in it
这是我添加到我的 urls.py 中的内容:
goal_resource = GoalResource
...
url(r'^api/', include(goal_resource.urls)),
这是我的 api.py:
class GoalResource(ModelResource):
class Meta:
queryset = Goal.objects.all()
resource_name = 'goal'
知道可能出了什么问题吗?