django ModuleNotFoundError: No module named












-1















My Project File :



The code from Views is :
[1]



from django.shortcuts import render



 def home(request):
return render(request, "home.html", {})


The code from urls is :
[2]



from django.contrib import admin

from django.urls import path

from firstproject.firstproject import blogs

urlpatterns = [

path('', blogs.views.home, name='home'),

path('admin/', admin.site.urls),

]


The Project File is :



the path of manage.py is in
C:projectfirstprojectfirstproject
the path of home.html is in
C:projectfirstprojectfirstprojectblogstemplates



when run The Project , showing me these message :
ModuleNotFoundError: No module named 'firstproject.firstproject'










share|improve this question

























  • Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

    – Sachin Gupta
    Jan 3 at 18:49
















-1















My Project File :



The code from Views is :
[1]



from django.shortcuts import render



 def home(request):
return render(request, "home.html", {})


The code from urls is :
[2]



from django.contrib import admin

from django.urls import path

from firstproject.firstproject import blogs

urlpatterns = [

path('', blogs.views.home, name='home'),

path('admin/', admin.site.urls),

]


The Project File is :



the path of manage.py is in
C:projectfirstprojectfirstproject
the path of home.html is in
C:projectfirstprojectfirstprojectblogstemplates



when run The Project , showing me these message :
ModuleNotFoundError: No module named 'firstproject.firstproject'










share|improve this question

























  • Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

    – Sachin Gupta
    Jan 3 at 18:49














-1












-1








-1








My Project File :



The code from Views is :
[1]



from django.shortcuts import render



 def home(request):
return render(request, "home.html", {})


The code from urls is :
[2]



from django.contrib import admin

from django.urls import path

from firstproject.firstproject import blogs

urlpatterns = [

path('', blogs.views.home, name='home'),

path('admin/', admin.site.urls),

]


The Project File is :



the path of manage.py is in
C:projectfirstprojectfirstproject
the path of home.html is in
C:projectfirstprojectfirstprojectblogstemplates



when run The Project , showing me these message :
ModuleNotFoundError: No module named 'firstproject.firstproject'










share|improve this question
















My Project File :



The code from Views is :
[1]



from django.shortcuts import render



 def home(request):
return render(request, "home.html", {})


The code from urls is :
[2]



from django.contrib import admin

from django.urls import path

from firstproject.firstproject import blogs

urlpatterns = [

path('', blogs.views.home, name='home'),

path('admin/', admin.site.urls),

]


The Project File is :



the path of manage.py is in
C:projectfirstprojectfirstproject
the path of home.html is in
C:projectfirstprojectfirstprojectblogstemplates



when run The Project , showing me these message :
ModuleNotFoundError: No module named 'firstproject.firstproject'







django python-3.x module django-views django-urls






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 5 at 11:59







Waleed Shedid

















asked Jan 3 at 18:23









Waleed ShedidWaleed Shedid

11




11













  • Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

    – Sachin Gupta
    Jan 3 at 18:49



















  • Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

    – Sachin Gupta
    Jan 3 at 18:49

















Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

– Sachin Gupta
Jan 3 at 18:49





Welcome to stackoverflow. Please go through the documentation on stackoverflow.com/help/how-to-ask. Do not post images of the code if it is small enough to post. Share details of whatever you have tried before posting the question to help us better understand your problem

– Sachin Gupta
Jan 3 at 18:49












1 Answer
1






active

oldest

votes


















0














As i can't really understand your question well, i want to believe you have a python file name firstproject.py where blogs is a name of a class or thereabout.
if this is so, then your code should be like this



from django.contrib import admin

from django.urls import path

from .firstproject import blogs


If this doesnot work, then share your project directories here (Preferable an image)






share|improve this answer
























  • Thank you so much

    – Waleed Shedid
    Jan 5 at 18:56












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54027780%2fdjango-modulenotfounderror-no-module-named%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As i can't really understand your question well, i want to believe you have a python file name firstproject.py where blogs is a name of a class or thereabout.
if this is so, then your code should be like this



from django.contrib import admin

from django.urls import path

from .firstproject import blogs


If this doesnot work, then share your project directories here (Preferable an image)






share|improve this answer
























  • Thank you so much

    – Waleed Shedid
    Jan 5 at 18:56
















0














As i can't really understand your question well, i want to believe you have a python file name firstproject.py where blogs is a name of a class or thereabout.
if this is so, then your code should be like this



from django.contrib import admin

from django.urls import path

from .firstproject import blogs


If this doesnot work, then share your project directories here (Preferable an image)






share|improve this answer
























  • Thank you so much

    – Waleed Shedid
    Jan 5 at 18:56














0












0








0







As i can't really understand your question well, i want to believe you have a python file name firstproject.py where blogs is a name of a class or thereabout.
if this is so, then your code should be like this



from django.contrib import admin

from django.urls import path

from .firstproject import blogs


If this doesnot work, then share your project directories here (Preferable an image)






share|improve this answer













As i can't really understand your question well, i want to believe you have a python file name firstproject.py where blogs is a name of a class or thereabout.
if this is so, then your code should be like this



from django.contrib import admin

from django.urls import path

from .firstproject import blogs


If this doesnot work, then share your project directories here (Preferable an image)







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 5 at 14:45









Akinniyi Bode BoladeAkinniyi Bode Bolade

86311




86311













  • Thank you so much

    – Waleed Shedid
    Jan 5 at 18:56



















  • Thank you so much

    – Waleed Shedid
    Jan 5 at 18:56

















Thank you so much

– Waleed Shedid
Jan 5 at 18:56





Thank you so much

– Waleed Shedid
Jan 5 at 18:56




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54027780%2fdjango-modulenotfounderror-no-module-named%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas