Django QuickStart Web Application for Beginners
HTML-код
- Опубликовано: 12 июн 2024
- Welcome to the QuickStart guide to Django Applications! 🤩
Where Django is a popular Python-based framework for web development and today we will set it up from scratch!
In this tutorial we will focus on some the main components of websites. We will:
1. Setup a Django development server using Python (01:46)
2. Render an HTML template (05:18)
3. Add some CSS Styling (13:26)
4. And last but not least - JavaScript client side interactions (20:24)
🛑 PLEASE KEEP IN MIND 🛑
-----------------------------------------------
This is a QUICKSTART guide with the sole purpose of connecting all the above components together! By the end of this tutorial you will have your very own template of a basic Django website and you will also learn which files and terms we use for different operations.
Or alternatively, you can just clone my code if you already have some background with Django:
github.com/MariyaSha/DjangoQu...
In the next few tutorials we will learn how to work with Django databases and templating engine! After we have all the basics covered - we will then move with creating a useful application and even hosting it online.
💻 RELATED TUTORIALS OF MINE 💻
--------------------------------------------------------------
⭐ Anaconda for Beginners:
• Anaconda Beginners Gui...
⭐ Flask Hello World Web App for Beginners:
• Simple Web App with Fl...
⭐ Simple Calculator Web App with Anvil:
• Simple Calculator with...
⭐ Advanced Web App with Flask and SQLite:
• Flask SQLite Web Appli...
⏰ TIME STAMPS ⏰
-----------------------------------------------
00:00 - intro
00:45 - install Django
01:46 - create Django project
03:04 - run Django server
03:56 - customize port number
04:37 - create Django app
05:18 - create an HTML template
06:31 - setup a templates directory
07:46 - working with views
09:19 - working with routes
13:26 - create a CSS stylesheet
14:56 - setup a static directory
15:59 - HTML file structure
17:50 - link stylesheet with templating engine
20:24 - setup JavaScript
21:18 - link JavaScript with templating engine
22:34 - thanks for watching!
🤝 Connect with me 🤝
--------------------------------------
🔗 Github:
github.com/mariyasha
🔗 Discord:
/ discord
🔗 LinkedIn:
/ mariyasha888
🔗 Twitter:
/ mariyasha888
🔗 Blog:
www.pythonsimplified.org
💳 Credits 💳
----------------------
⭐ Beautiful animated graphics by:
mixkit.co - Наука
Why do you put a forward slash after the variable you defined, which was called in the path method?
Great question Michael! 😀
I would think that if you set it to "myapp" instead of "myapp/" and then try to lead to another route after that -
we won't be dealing with "localhost:8000/myapp/myview" but with "localhost:8000/myappmyview" as we never added a slash after "myapp".
I might be wrong, but if we do an experiment and dispose of the backslash - we immediately get a "Page not found (404)" error.
However, in the case of changing "myview/" to and empty string "" - we never had any issues as we didn't add any additional routes after it.
Also note that when we looked at the myproject/urls.py file, the existing 'admin/' route included a backslash to begin with.
According to this principle - I repeated it across any new route I've added on my end. Only after I've seen your question, I've started experimenting with that... I must admit that I didn't even think of it! 😊
Thank you so much for your awesome question! I'll pin it to the top to see if any Web Dev experts will be able to confirm my answer from above, as I'm not entirely sure I got it right... I would say it's a fancy guess at this point of time 😉
@@PythonSimplified did you try to add a backslash to the beginning of the next folder route??, I mean, in your example, if you remove the backslash at the end of "myapp", did you try to add it to the next dir, like "/myview" ???
yo yo yo
😂😂😂
You are unique.
I wish you all the best.
You has definitely mastered the sacred arts of simplified teaching. I learn in a single video what I don't learn in weeks of college class
Yeeeyyy! Thank you so much! Super happy you find my tutorials useful! 😃😃😃
Yeeyyyy!!! Thank you so much!! Super happy you find my tutorials useful! 😃😃😃
Your teaching and content is top-notch and truly exceptional. I am incredibly grateful to have found it.❤️ Thank you for sharing your knowledge and expertise with the world. Keep up the great work!
It's the best Django explanation that I've met ever, thank you Mariya
Perfect timing! Just got added to a project that uses django at work and it’s my first time working with python backend. Thanks for the great videos.
Yeyyy! It will definitely save you a few hours of reading Stack Overflow posts! hahaha 😉
Django docs are very ambiguous when it comes to Static files as well as "urls.py"... I had some struggle there 😅
Yo yo yo!
I watched this video to the end and it's amazing. I never thought Django is so easy to start. Thank you for explaining.
Great tutorial -- clear, concise, informative, entertaining! You have a very special talent in teaching and your joyful energy is contagious! Thank you so much! I'm a new subscriber:)
thank you very much from Brazil. I really appreciate your effort, Mariya. I feel lucky that the youtube algorithm recommended your channel to me.
Thank you very much for this video. It’s been of great help to me. It made the documentary easier to understand and work with.
Thank you so much for creating and sharing such an insightful and informative tutorial on setting up a Django development environment and creating a basic web application! Your step-by-step guidance made it incredibly easy for me as a beginner to understand the process and get started with Django. I truly appreciate the effort you put into explaining each aspect, from setting up Anaconda to adding static files. Your video has been immensely helpful in building my confidence and skills in Django development. Looking forward to more content from you! Keep up the fantastic work!
yo yo yo !
Your videos are amazing! Thank you sooo much 😊
I love you for that "CTRL + Reload"
I had some nightmares when setting up stylesheets with Flask, took me quite some time to understand that the problem is refreshing the cache rather than something in my code 😉
Ever since - I mention Ctrl + Refresh in any possible opportunity hahahaha 😁
@@PythonSimplified Flask was my first ever full-stack framework :D Anyway thanks for that tip. Also i want to update: i love you for all your content *-*
@@PythonSimplified i wonder why you have such small amount of views. You should be top in youtube as best female python developer :)
I chan read this ;) Thank you so much! So clear and coherently. I'm happy youtube recomended you channel and now I can engoy and learn your lessons. Thank you!
Thank you so much for the incredible feedback! 😃
If anyone else had issues activating djangoQS environment, I had to deactivate (base) first, then I was able to activate (djangoQS) environment - thanks for the cool video!
thks you so much, I love the simple way to teaching us..!!
My goodness! You rock Maryia! Thanks a bunch
Very clear explanation! Very useful ! Thank you so much !!! 🏆🏆🏆🏅🏅🏅🙏
Great video, very clear and complete, and the teacher has the most beautiful eyes in the world, thank you
Refreshing different approach,...thank you!
Yo yo yo, you are the bestyo develepoyo teacheryo. Thank you a lot.
Awesome explanation ................ U made Django so easy. Keep up the good work.
Love frm India ❣❣❣❣
thank you so so much for this - so refreshing and engaging
This is perhaps the single best tech tutorial I’ve ever come across. Additionally, your communication style is exceptionally engaging without getting distracted and annoying. Great video
yo yo yo this was amazing :D , THANK YOU
Thanks a lot for the video. I discovered this channel today and you make great videos. I hope you get 1 million subscribers
thank you so much, this helped me a lot
just found your channel, you're a fantastic teacher! and my wife loves your hair. 🔥
This is amazing. Thank you so much!
very helpful ! thanks
Thank you so much. I really hope you'll continue this django serie.
And I hope for more Django tutorials especially with Forms. 🙂 Your job is just GREAT!!!
Absolutely! I'll continue this series in the near future, I think a databases video will come sooner than forms... but it's definitely on my "to-do" list! 😉
@@PythonSimplified please continue it
Yo yo yo! You sure have some explanation skills there! You don't only show the what, but also the why. Excellent!
Thank you so much Gideon! 😁
Awesome Mariya !
thank you so much
and please do more Django tutorials 🤩
this was great. Thanks
Amazing tutorial, I am now a confident beginner.
AWESOME. Thank you.
Thanks very good tutorial, waiting next video
Django is awesome! Thanks!
very nice explanation! thank you
Really well explained. No endless BS fr.
i was waiting for this video!
you are an excellent teacher and incredible human
Not sure why I clicked this video, even watched few cut scenes, anyway, very high energy and concise method of teaching!
yo yo yo! Thanks for this great content! You saved my hopes that Django would be the love at (probably) fourth sight :D
How can one person be this beautiful, intelligent, simple and super helpful. When it gets difficult for me, all I need to do is look for your tutorial on it and its done. You are a life saver and I appreciate you. Thank you Mariya for all you do to help us simplify the process🤟
this is outrageous! I'm trying to learn here, and I keep looking at her! 😉
Thats awesome we got the same monitor (curved). Also this was a really good video!
It's amazing 🤩
Good stuff! Thanks!
It is a pleasure to comment this video.
Thanks! Your tutorials are excellent.
Yo yo yo.
Thank you so much B C! 😃
Excellent vidéo !
Resulta muy útil este contenido, y a pesar de que esta lleno de tutoriales de django, este esta entre los mas actuales y atractivos.
Thank you for your help!!!
thanks for the subtitles
many thanks love.
Thank you very much :) I'm learning Django right now, so your video is very helpful.
Glad I caught you in the perfect timing! 😉
This will help me alot ❤️💙
You are the best person ever
As usual you are amazing. Thanks for that.
Thank you so much! 🙂
Super vidéo !
Hi !! Thank you so much for starting this , I'm learning Django right now, so now I need to Integration a third party Reporting Tools like BIR, Jasper or Crystal Reports with django project.
Thanks Maria for the best lesson :)
Thank you for the awesome comment! 😊
i hope a you create a django crud functionality tutorial. btw you explained it so good and much easier to understand than most of the tutorials here in youtube.
Great video! So know we have Django installed. When to expect your charming explanation on how to continue this amazing framework? I can' t wait.
Mariya you the best!
realy amezing🥰
Thanks!
yo yo yo awesome 😎🤘
Thank you for simplifying Python 💯🤙🏾
Awesome content. Can you please do one on Django and MongoDB? 😊👊🏾
yo yo yo 🙌 , thank u Maria
Thank you
Nice video.
I love your voice and accent!
Yo yo yo! Thank you
Hello sweety, thanks for your videos 🥳
Like your video but I will need to watch and again but it's a great video for starters
Increible! esto resume 3 semanas tratando de que mi app funcionara / This sums up 3 weeks of trying to set up my first website. thanks!!!
hahah nice, q positivo el impacto de tu comment!!!
I hear ya, Fidel! 😀 I had to browse through dozens of stack overflow posts to connect all the pieces of the puzzle 😅
The documentation is not very clear when it comes to Static files, most of my struggle was there...
Needless to say - I'm not looking forward to exploring the database models hahahaha 🤣🤣🤣
(I might have to though, I think I'll rebuild my blog with Django, I do like how lightweight it is, especially in a combination with Jinja2)
@@PythonSimplified well you will see the nginex and gunicorn deploy xD, I have lots of problems with the statics files.
hi nice video! very straightforward !! One question I have, is if we could possibly set one directory for static files and templates... it seems to me a little bit non trivial not to be able to access both by just setting one directory in the settings file. Don't know if I am clear..
good one.
Excellent job!!
Thank you so much! happy you liked it! 😃
@@PythonSimplified I have one comment though, compared to the web development I have been doing, this seems quite complicated in comparison. I know you have not talked about database work yet, but what is the actual advantage of using the Django Framework?
Hi, thank for you simplifiend videos, is there any followup video on Django ?
Amazing QuickStart.
Is the next part coming???
I hope more features and more devs will use DJ.
Hi Maria, I am Kasondel from Zimbabwe 🏳🌈 Thanks for your videos, very educative.
i think i am in love.
Nice tutorial
Thank you! :)
Why do you put a forward slash after the variable you defined, which was called in the path method?
Thanks...Could you continue?
So much great Python content! Any thoughts on FastAPI?
what preferably to use with django: conda or pip+virtualenv?
Yo yo yo! 😄
謝謝🙏分享
hey, what about data structures explained on python? There are few videos with that, vast majority of that topic basing on java or c. For example linked lists, hash tables etc.
do we need to follow the same process if we use pycharm, there if I import Django , do I still need to follow these steps
Great video Mariya! 🚀 If anyone’s looking for more Python tutorials, we’ve released Loguru logging, task scheduling, and more to help the community too 💪
Yo yo yo! ❤
Are you using Conda as in Anaconda? Is that like saying python3 -m pip install django?
My problem is that when I call my management folder, it says that there is no such folder. I searched Stackoverflow and found the answer, but it was for Linux, I don't know how to fix the answer in Windows. I have this issue in other parts of the program, but when I look, the other parts are also formed. Please help me, what he wrote seems to be not path correct, I could not translate the codes to windows cmd codes