Hey ninja you are some awesome man. I tried to learn codinf of django by others videos. But all are just throwing out words. But you are teaching what are the meanings of them and what is the meaning of this thing, this thing, etc. So it is so much easy to understand with its meaningfull way. you are the best teacher i have ever found. and you know i don't even follow any computer science degree but i followed your videos. Thank you ninja, You are savior
Probably the best explanation how everything thing is wired up. Thanks for taking the time to explain Projects/Apps, and difference emphasizing that url routes to view, -> templates. I think most other tutorials don't go into details step by step how everything ties in together. This was a very well laid out explanation using very simple concepts.
For those who using Django 2.0, the url is replaced by path so just typed this in the root urls.py: path('articles/', include('articles.urls')), And for the urls.py in the articles app, can typed in different name like path('articles_home/', views.article_list), Finally, when call the route in the browser, just call 127.0.0.1:8000/articles/articles_home Will solve the problem that the page keep returns NOT FOUND 404 error. PS: If fully following the video on naming then can just call 127.0.0.1:8000/articles/articles Its just seems weird route to me~ And thanks ninja for the hard work and awesome tutorials! I've learn a lot from you! :D
Thx dude! was being stucked with the urls, settings, views concepts for few days by someone else videos... and hence you solved all those puzzle in 15mins! Thank you!
Thank you for explanation. Now I understand what is a project and what is an app within a Django project. Apps are like widgets that do some specific actions and that we can reuse in another project for example.
This is a great tutorial, but I just wish there was a snapshot diagram / anatomy showing every piece linked together. Trying to remember all this via the files & code is not necessarily easy for beginners. It's easy to not "see the forest, for the trees". Nevertheless, seems to be the most thorough Django tutorial I've seen.
Oh man you are awesome I have been coding in past But i had no idea what i am doing that’s why have used to face lot of problems But your way of teaching django has cleared my confusions and made this look so beautiful Thanks a ton Keep up the good work. Can you help me get a freelance work for this? That Would be great
for anyone receiving the template not found error, go into your settings and paste the entire path related to the article templates folder in the DIR list to fix the error. example: 'DIRS': ["templates",r"C:\Users\your name\Documents\Web Applications\To-Do\djangonautic\articles\templates"]
Hi - excellent video series. I don't know how you have done it but the resolution is great. Other atom-based videos are generally poor although they are put out in 1080. Thanks again.
There is no "settings.py" file in our current "articles" app, how does Django know that it needs to go to TEMPLATES folder first, to open "articles/article_list.html" file, if we specify just "return render(request,'articles/article_list.html')"?
This is how I imagine django knows where to look: 1) ------ The main project is the outer layer and the main urls.py serves as a window through which django gains access to the inner mini apps. When django checks the main urls.py, it sees this: url(r'^articles/', include('articlesApp.urls')), the "include" keyword tells django to go somewhere else directs django to look for the mini app (articles) and more specifically; the urls.py of that mini app (we created that file ourselves. it's not created automatically when you start a new app) 2) ---- Now that we are in the urls.py of the mini app (articles), django sees this: urlpatterns = [ url(r'^$', views.artciles_list) ] and thus acknowledges there is a mapping between the (home route of the mini app) and a function called "article_list" that exists "as you already know" in the views.py file of the mini app. 3) ---- and finally as you can see here, def artciles_list(request): return render(request, "articles/articles.html") the second parameter makes sure django is looking at the right place. ""articles/articles.html""
I have same question even i tried the same steps but django still looking into main app. i am getting below error while accessing the page. Request Method: GET Request URL: 127.0.0.1:8000/articles/ Django Version: 2.1.4 Exception Type: TemplateDoesNotExist Exception Value: articles/article_list.html Exception Location: C:\Users ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\template\loader.py in get_template, line 19 Python Executable: C:\Users ikumar\AppData\Local\Programs\Python\Python37-32\python.exe Python Version: 3.7.1 Python Path: ['C:\\Users\ ikumar\\DjangoProject\\djangonautic', 'C:\\Users\ ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\python37.zip', 'C:\\Users\ ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\DLLs', 'C:\\Users\ ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\lib', 'C:\\Users\ ikumar\\AppData\\Local\\Programs\\Python\\Python37-32', 'C:\\Users\ ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages'] Server time: Wed, 19 Dec 2018 05:01:21 +0000 ------------------------------ Django tried loading these templates, in this order: Using engine django: django.template.loaders.filesystem.Loader: C:\Users ikumar\DjangoProject\djangonautic\Template\articles\article_list.html (Source does not exist) django.template.loaders.app_directories.Loader: C:\Users ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\templates\articles\article_list.html (Source does not exist) django.template.loaders.app_directories.Loader: C:\Users ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\templates\articles\article_list.html (Source does not exist)
Initially it was not working . I tried changing imports From django.urls import include But still it didn't work and then i get back to old import for include. It some worked after that I didn't get what happened there.
Are Django apps similar to how Microservices work? In the way that there is a different application for each function of the app? Can these Django apps be split to run on different machines?
PLEASE HELP: File "E:\Z\Django\myproject\myproject\urls.py", line 10, in path(r'articles/',include(articles.urls)), NameError: name 'articles' is not defined Ive searched for a solution everywhere
Awesome like always keep it up bro. one question please, what framework would you recommend on building a simple like CMS with an admin panel that can manage databases/tables? cheers, by the way to you have more in depth courses anywhere? thanks
Is there a way to link two apps together? So i have two apps which have two different product models. One of them is linked to the bag/checkout. But when i try to add the other app to add items to the bag it doesn't work. Please let me know if theres a way or guide to conmecting two apps to checkout bag
please help me to tackle this problem currently i'm using django 2.0 version , i'm have followed same step as mention in the video, but still it arising this issue TemplateDoesNotExist, By the way ur videos are awesome
Yelp! I am getting an error when I spin up the server using "python manage.py runserver" cmd. I get this error: django.core.exceptions.ImproperlyConfigured: WSGI application 'djangonautic.wsgi.application' could not be loaded; Error importing module. what could be causing this? I've been following the tute closely and haven't touched the wsgi file
Hey shun, i love the way u teach, and i stuck in rendering return render(request, 'articles/article_list.html'), Its giving me "template doesn't exist" When use like this ex :I've removed articles folder which is in app level templates folder and I refer like this return render(request, 'article_list.html'), It works well but as u said, if both templates have same name at "project level template and app level template", then priority will go to project level template so to avoid this we've create name space just I've done but it unable to find this name space ex: return render(request, 'articles/article_list.html'), *if we read this plz gimme answer* *I'm using vs code*
@@varunarya2126*hey tq bro but I've already added template folder name to the root directory, and I've uninstalled the project and created a new one and surprisingly it was workes and rx for ur suggestion varun*
Hey, the syntax theme is Atom Monokai, and the UI theme is One Dark. I also use a package called 'Seti Icons' for all the little icons in he file tree on the left :)
Not sure if anyone is still looking at these comments, but have been following this tutorial as closely as possible but have hit a snag with including the articles.urls module to the views.py file of the main project folder. I seem to be getting this error returned: File "C:\Users\HP\Desktop\Projects\web_app\website\articles\urls.py", line 6, in url(r'^about/$', views.about), AttributeError: module 'articles.views' has no attribute 'about' Can't seem to figure out why this keeps occurring. Can anyone help?
because we use django-admin startproject djangonautic at first. For articles we use python manage.py startapp articles. Here djangonautic is the actual project where articles is just an app inside the project
I am having this issue, If i change the name of templates folder into other in one of my other project doesn't work, but if i use the name 'templates'. It works. Is there any particular reason to use that name only.
hello The Net Ninja i am getting this error: Using the URLconf defined in huewood.urls, Django tried these URL patterns, in this order: admin/ articles/ articles/ about/ The current path, articles/, didn't match any of these. it seems that there is a space in between articles/ articles but i am sure i typed it within spaces. hellpppp. :(
Django 2.0.1 , include articles in main urlpatterns is not working ( using path not url ) like path('articles/', include('articles.url')). can someone pls assist
I just changed path to url, or rather I typed everything I saw in this tutorial, and it worked, so remove paths and import url using whatever he did in this tutorial
Hey ninja you are some awesome man. I tried to learn codinf of django by others videos. But all are just throwing out words. But you are teaching what are the meanings of them and what is the meaning of this thing, this thing, etc. So it is so much easy to understand with its meaningfull way. you are the best teacher i have ever found. and you know i don't even follow any computer science degree but i followed your videos. Thank you ninja, You are savior
Probably the best explanation how everything thing is wired up. Thanks for taking the time to explain Projects/Apps, and difference emphasizing that url routes to view, -> templates. I think most other tutorials don't go into details step by step how everything ties in together. This was a very well laid out explanation using very simple concepts.
This is the best Django series ever! I am successfully being able to do everything perfectly.
6 years old, but still very useful.
Thanks for these tutorials.
With a bit of GPT help, and I'm able to do some interesting stuff.
For those who using Django 2.0, the url is replaced by path so just typed this in the root urls.py: path('articles/', include('articles.urls')),
And for the urls.py in the articles app, can typed in different name like path('articles_home/', views.article_list),
Finally, when call the route in the browser, just call 127.0.0.1:8000/articles/articles_home
Will solve the problem that the page keep returns NOT FOUND 404 error.
PS: If fully following the video on naming then can just call 127.0.0.1:8000/articles/articles
Its just seems weird route to me~
And thanks ninja for the hard work and awesome tutorials! I've learn a lot from you! :D
I was stuck on this for a while...wouldn't have tried again if it wasn't for you....thanks man
Paid for a Django course on Udemy and yet this is so much more intuitive! Thanks!
Udemy Django courses are outdated
@@shreehari2589 this one too but also good
Thx dude! was being stucked with the urls, settings, views concepts for few days by someone else videos... and hence you solved all those puzzle in 15mins! Thank you!
Even though these tutorials are 3 years old, i came here to learn django from you, so many thanks and i wish this course gets updated
Bro ur tutorials are far better than many other tech channels
Thank you for explanation. Now I understand what is a project and what is an app within a Django project. Apps are like widgets that do some specific actions and that we can reuse in another project for example.
Love the graphic....you should be proud :) and the tutorials are well explained...thank you
Very kind to offer such great tutorials for free online! thank you very much for your help and your good way of teaching, you are the best
Yes, I also agree on the fact that you are the best programming teacher I have ever had!
Man even 11 year old me will understand what he teach . Really thankful for you man .
Very very clear explanation, thank you
Welcome to the best django series in the entire universe, lol. I've been following since video 1
I'm so bloody glad I found this tutorial series.
Thanks bro, you are best teacher
Amazing tutorial. So clear. Thank you!
Your django series are really awesome. Thank you ninja 🤖🤖🤖
Glad to hear that :) thanks Mabel!
Yow content after content i feel like a better developer already...thanks mate
This is a great tutorial, but I just wish there was a snapshot diagram / anatomy showing every piece linked together. Trying to remember all this via the files & code is not necessarily easy for beginners. It's easy to not "see the forest, for the trees". Nevertheless, seems to be the most thorough Django tutorial I've seen.
Thank you kind sir. I was completely lost. Now I am found.
Hey this is great man. You saved my life
Oh man you are awesome
I have been coding in past
But i had no idea what i am doing that’s why have used to face lot of problems
But your way of teaching django has cleared my confusions and made this look so beautiful
Thanks a ton
Keep up the good work.
Can you help me get a freelance work for this?
That Would be great
Awesome explanation
for anyone receiving the template not found error, go into your settings and paste the entire path related to the article templates folder in the DIR list to fix the error.
example: 'DIRS': ["templates",r"C:\Users\your name\Documents\Web Applications\To-Do\djangonautic\articles\templates"]
thanks buddy
Thank you, you helped me alot
Wow, I am so impressed by your videos! Thank you so much!!
Hi - excellent video series. I don't know how you have done it but the resolution is great. Other atom-based videos are generally poor although they are put out in 1080. Thanks again.
For all u r videos, u r awesome, great and no words to explain!!!!
Thank you so much 😀
@@NetNinja Could you please create a video of Get and Post function and also retrieving data from Mongodb database. It is will be very useful!!!
Enjoying these videos - wondering when the other videos will be released!!
This is the best tutorial. Belive it!
Hats off to you man! your videos are helping alot.
Thanks, That is really awesome
There is no "settings.py" file in our current "articles" app, how does Django know that it needs to go to TEMPLATES folder first, to open "articles/article_list.html" file, if we specify just "return render(request,'articles/article_list.html')"?
This is how I imagine django knows where to look:
1)
------
The main project is the outer layer and the main urls.py serves as a window through which django gains access to the inner mini apps. When django checks the main urls.py, it sees this:
url(r'^articles/', include('articlesApp.urls')),
the "include" keyword tells django to go somewhere else directs django to look for the mini app (articles) and more specifically; the urls.py of that mini app (we created that file ourselves. it's not created automatically when you start a new app)
2)
----
Now that we are in the urls.py of the mini app (articles), django sees this:
urlpatterns = [
url(r'^$', views.artciles_list)
]
and thus acknowledges there is a mapping between the (home route of the mini app) and a function called "article_list" that exists "as you already know" in the views.py file of the mini app.
3)
----
and finally as you can see here,
def artciles_list(request):
return render(request, "articles/articles.html")
the second parameter makes sure django is looking at the right place. ""articles/articles.html""
I have same question even i tried the same steps but django still looking into main app.
i am getting below error while accessing the page.
Request Method: GET
Request URL: 127.0.0.1:8000/articles/
Django Version: 2.1.4
Exception Type: TemplateDoesNotExist
Exception Value:
articles/article_list.html
Exception Location: C:\Users
ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\template\loader.py in get_template, line 19
Python Executable: C:\Users
ikumar\AppData\Local\Programs\Python\Python37-32\python.exe
Python Version: 3.7.1
Python Path:
['C:\\Users\
ikumar\\DjangoProject\\djangonautic',
'C:\\Users\
ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\python37.zip',
'C:\\Users\
ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\DLLs',
'C:\\Users\
ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\lib',
'C:\\Users\
ikumar\\AppData\\Local\\Programs\\Python\\Python37-32',
'C:\\Users\
ikumar\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages']
Server time: Wed, 19 Dec 2018 05:01:21 +0000
------------------------------
Django tried loading these templates, in this order:
Using engine django:
django.template.loaders.filesystem.Loader: C:\Users
ikumar\DjangoProject\djangonautic\Template\articles\article_list.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users
ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\templates\articles\article_list.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users
ikumar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\templates\articles\article_list.html (Source does not exist)
Initially it was not working .
I tried changing imports
From django.urls import include
But still it didn't work and then i get back to old import for include.
It some worked after that I didn't get what happened there.
Nice Tut !
Which fonts are you using?
You are an awesome Ninja!!...Thank you!!
Are Django apps similar to how Microservices work? In the way that there is a different application for each function of the app? Can these Django apps be split to run on different machines?
The Ninja Strikes again. Hope you can make a real life project Django tutorial up to Deployment and I will buy it. Thanks
hey thanks man it worked
No problem 👍
PLEASE HELP:
File "E:\Z\Django\myproject\myproject\urls.py", line 10, in
path(r'articles/',include(articles.urls)),
NameError: name 'articles' is not defined
Ive searched for a solution everywhere
@Alex Rohan thank you , it helped me also.
Awesome like always keep it up bro. one question please, what framework would you recommend on building a simple like CMS with an admin panel that can manage databases/tables? cheers, by the way to you have more in depth courses anywhere? thanks
Is there a way to link two apps together? So i have two apps which have two different product models. One of them is linked to the bag/checkout. But when i try to add the other app to add items to the bag it doesn't work. Please let me know if theres a way or guide to conmecting two apps to checkout bag
Tell the difference between / and \ usage whilr wrting the address.
Where to use them .
Pls.
great video mate
Thanks 👍
please help me to tackle this problem currently i'm using django 2.0 version , i'm have followed same step as mention in the video, but still it arising this issue TemplateDoesNotExist, By the way ur videos are awesome
Your templates folder isn't in a correct location, it should be right next to manage.py (for the homepage and about pages)
thanks a lot
Yelp! I am getting an error when I spin up the server using "python manage.py runserver" cmd. I get this error:
django.core.exceptions.ImproperlyConfigured: WSGI application 'djangonautic.wsgi.application' could not be loaded; Error importing module.
what could be causing this? I've been following the tute closely and haven't touched the wsgi file
sir please help when i write this "obj = test.objects.all() " then error is "Class 'test' has no 'objects' member" sir what i do.
You should include a link to all chapters
man you are God
Hey shun, i love the way u teach, and i stuck in rendering
return render(request, 'articles/article_list.html'),
Its giving me
"template doesn't exist"
When use like this ex :I've removed articles folder which is in app level templates folder and I refer like this
return render(request, 'article_list.html'),
It works well
but as u said, if both templates have same name at
"project level template and app level template",
then priority will go to project level template so to avoid this we've create name space just I've done but it unable to find this name space
ex: return render(request, 'articles/article_list.html'),
*if we read this plz gimme answer*
*I'm using vs code*
Try to Add the 'templates' name in the Settings.py file DIRS:[ ]
@@varunarya2126*hey tq bro but I've already added template folder name to the root directory, and I've uninstalled the project and created a new one and surprisingly it was workes and rx for ur suggestion varun*
@@kvnagendra5354 i'm getting same error, can you help me out? did u find any solution?
which version of django are you using
YOU ARE THE BEST!!
Sir what is the theme you are using in atom?...It looks nice..
Hey, the syntax theme is Atom Monokai, and the UI theme is One Dark. I also use a package called 'Seti Icons' for all the little icons in he file tree on the left :)
The Net Ninja
Thnks for taking the time to reply out of your hectic schedule
Great stuff
Can you make a tutorial with bookshelf.js
Is it ok that we dont create project on virtual environment
I believe best practices are to create your project on virtual environment to avoid overwriting django root files
how to solve this error ? AttributeError: module 'articles.views' has no attribute 'articles_list'
Not sure if anyone is still looking at these comments, but have been following this tutorial as closely as possible but have hit a snag with including the articles.urls module to the views.py file of the main project folder. I seem to be getting this error returned:
File "C:\Users\HP\Desktop\Projects\web_app\website\articles\urls.py", line 6, in
url(r'^about/$', views.about),
AttributeError: module 'articles.views' has no attribute 'about'
Can't seem to figure out why this keeps occurring. Can anyone help?
Found the answer:
Include an "about" view within articles view.py file.
How Django knows that "djangonautic" is a main app, and not the "articles" app is a main one?
because we use django-admin startproject djangonautic at first. For articles we use python manage.py startapp articles. Here djangonautic is the actual project where articles is just an app inside the project
I am having this issue, If i change the name of templates folder into other in one of my other project doesn't work, but if i use the name 'templates'. It works. Is there any particular reason to use that name only.
Django search for whatever name u added at django's settings. That "DIRS" list
thanks
Thanks for watching!
hello The Net Ninja
i am getting this error:
Using the URLconf defined in huewood.urls, Django tried these URL patterns, in this order:
admin/
articles/ articles/
about/
The current path, articles/, didn't match any of these.
it seems that there is a space in between articles/ articles but i am sure i typed it within spaces.
hellpppp. :(
try removing ^ sign from the url(r'^articles/',include('articles.urls'))
hello the net ninja and thanks again :-o)
Please make an app with Angular and python
How to create realtime chatting system like socket.io using Django?
thx
thaaaaanks
url is no longer working. Its path now.
thanks dude
Django 2.0.1 , include articles in main urlpatterns is not working ( using path not url ) like path('articles/', include('articles.url')). can someone pls assist
You have to import include before use it.
from django.urls import path, include
replace it with path('articles/', include('articles.urls'))
1:19 you should be proud
The best!!!
tạo folder templates trong app mới và tạo thêm folder con trong folder templates đựt tên theo app mới --> tao file htm
code view để vào file html
it shows me TemplateDoesNotExist at /articles/article_list.html
OK i fix it by changing template to templates -_-
can you help i am not able to resolve even after this as well
@@MrBreslet at settings .py at Templates DIRS = ['djangonautic/templates' , 'articles/templates']
I did exactly that and I didn't get the same results , it keeeps saying that my does not exist
u probably messed up keep on trying watch again carefully it happens all the time
I just changed path to url, or rather I typed everything I saw in this tutorial, and it worked, so remove paths and import url using whatever he did in this tutorial
it can do path way also. i get results. the wrong i did before i didnt put .html for view render my_list file
You ever find the solution I am going through these and have this issue right now.
U are great
python manage.py runserver
Ok
"[WinError 123] The filename, directory name, or volume label " could you please help me this error
python version - 3.7.0
Can you specify PLEASE?!? NO ONE can help you if you only provide this level of information. No wonder no one replied to you comment....
Tao app moi
please help I am getting this error:
django.template.exceptions.TemplateDoesNotExist: articles/article_list.html
templates folder should be right next to manage.py (for the homepage and about pages).
@@sakshibhalothia8770 what about articles one?