Skip to content

django (AttributeError: module 'blog.views' has no attribute 'home') #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajay191999 opened this issue Jan 12, 2020 · 1 comment
Closed

Comments

@ajay191999
Copy link

djangomainfolder/blog/urls.py


from django.urls import path
from . import views


urlpatterns = [
    path('', views.home, name='blog-home'),
]



djangomainfolder/blog/views.py

from django.shortcuts import render
from django.http import HttpResponse

def home(request):
	return HttpResponse('<h1>Blog Home</h1>')

djangomainfolder

from django.contrib import admin
from django.urls import path, include 

urlpatterns = [
    path('admin/', admin.site.urls),
    path('blog/', include('blog.urls')),
]

my main file

django_tutorial.zip

Issue after typing "python manage.py runserver" in command line

cmdlinerunserver

@ImOmkar
Copy link

ImOmkar commented Jan 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants