Hi,
Please check the typo.
It is django.http
On Sun, 20 Sep 2020, 12:11 am coolguy, <cooldjangoprogrammer@gmail.com> wrote:
Instead offrom pages import viewsusefrom . import views--On Saturday, September 19, 2020 at 11:15:34 AM UTC-4 leoa...@gmail.com wrote:*file views.py in folder pagesfrom django.htpp import HtppResponsefrom django.shortcuts import render# Create your views here.def home_view(*args, **kwargs): # *args, **kwargsreturn HtppResponse("<h1>hello world</h1>")C:\Users\leo>C:/python37/python.exe c:/python37/Try-Django-master/src/pages/views.pyTraceback (most recent call last):File "c:/python37/Try-Django-master/src/pages/views.py", line 1, in <module>from django.htpp import HtppResponseModuleNotFoundError: No module named 'django.htpp'from django.htpp import HtppResponsefrom django.shortcuts import render*files urls.pyfrom django.contrib import adminfrom django.urls import pathfrom pages import viewsurlpatterns = [path('', views.home_view, name='home'),path('admin/', admin.site.urls),]file settingINSTALLED_APPS = ['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles',# third party# own'pages','products',]error :File "C:\python37\Try-Django-master\src\trydjango\urls.py", line 19, in <module>from pages import viewsFile "C:\python37\Try-Django-master\src\pages\views.py", line 1, in <module>from django.htpp import HtppResponseModuleNotFoundError: No module named 'django.htpp'
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/64c882b9-9ab4-49a5-9a72-347cdadd324dn%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK5m315eBUKiQA22O27JxuDQ3-p4sqBq0MEcWYCHiaSrLhh3wQ%40mail.gmail.com.
No comments:
Post a Comment