I am trying to fetch a few rows from the DB using the following code in my views.py:
from django.http import HttpResponsefrom django.shortcuts import renderfrom fusioncharts.models import QRC_DB def display_data(request,component): query_results = QRC_DB.objects.get(component_name__contains=component) return HttpResponse("You're looking at the component %s." % component) For the above, I am getting the following exception: django.core.exceptions.ImproperlyConfigured: The included URLconf 'Piechart_Excel.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import. However whenever I am *removing/commenting out* the below line, the above exception disappears: query_results = QRC_DB.objects.get(component_name__contains=component) Can anyone say what can be going wrong here? urls.py file under app is as follows: from django.urls import path from fusioncharts import views urlpatterns urlpatterns > = [ > path('push-data/', views.push_data, name='push-data'), > path('home/', views.home, name='home'), > path('display_data/<str:component>', views.display_data, name= > 'display_data'), > ] The url under the main project is as follows: from django.contrib import adminfrom django.urls import path,include > > urlpatterns urlpatterns = [ > path('admin/', admin.site.urls), > path('', include('fusioncharts.urls')) > ] So please advise what's going wrong. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0acc7888-9e25-43fd-8a50-64fe43086190%40googlegroups.com.