is not app
views.py
from django.http import HttpRequest
def index(request):
return HttpRequest("Hello World.")
urls.py
from django.shortcuts import render
from django.conf.urls import url
from django.contrib import admin
from django.urls import path
from views.py import views
urlpatterns = [
path('admin/', admin.site.urls),
url(r'^$',views.index),
]
On Monday, February 5, 2018 at 4:54:59 PM UTC+3:30, sarvit sarvit wrote:
>
> Hello
> I importing error
> Please help me
> from django.shortcuts import render
> from django.conf.urls import url
> from django.contrib import admin
> from django.urls import path
> from . import views
>
>
> Traceback (most recent call last):
> File "c:\Users\saeid\Desktop\sade\env\Post\Post\urls.py", line 20, in
> <module>
> from . import views
> ImportError: cannot import name 'views'
>
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/1d3b5804-123c-40ce-9ec9-fa4bb5fc8495%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.