#7 Django tutorials | Addition of Two Numbers in Django

preview_player
Показать описание
In this lecture we will discuss:
we will doing operation on our code

#3 create a url for add function

-- in this file we will show the result of our operation
-- using {{}} we will show the result

-- in this function we will take two number from user
-- we will add these two number and store in a variable

#3 create a url for add function
-- in this url we will pass two number
-- we will call add function and pass these two number
-- we will return the result of add function

-- in this form we will take two number from user
-- we will pass these two number to add function


Django is a high-level Python-based free and open-source web framework, which follows the model-view-template (MVT) architectural pattern.
It is maintained by the Django Software Foundation (DSF).
Django's primary goal is to ease the creation of complex, database-driven websites.
Some well-known sites that use Django include the Public Broadcasting Service, Instagram, Mozilla, The Washington Times, Disqus, Bitbucket, and Nextdoor.

Editing Machines & Monitors :

Facebook:

Subscribe to our other channel:

Donation & Support:
PayPal Id : navinreddy20
Patreon : navinreddy20
Рекомендации по теме
Комментарии
Автор

great explanation, smiling for errors shows developers good job telusko team

kannacsm
Автор

ur energy while explaining anything : always super energy

pavankumarmadasu
Автор

This one is a very important video. many of other tutorials in youtube did not give this kind of actual operation. By seeing this, I could do what i want to do in my code. Thank you very much

vinayak
Автор

You made it super simple. I have spent hours watching countless tutorial but couldn't get it. Great Job Telusko

ihcc
Автор

Flow explained above SIMPLIFIED:
Here we need to enter 2 numbers, add them & print result in new page.
1. In the home.html create a form to add 2 numbers home page.
a. Need 2 text fields to get values & button to submit it.
2. Need a page to display the results (result.html) - create it.
3. Created a new page, need to register in "urls.py".
4. Now, page is created & registered in URL's => now we need logic for it.
a. Create a function to add in "views.py" which gets the response from "home.html
b. And return to "result.html
5. Finally, in "result.html" receive response in a variable.
6. DONE.
Create a page -> register it in urls -> write logic in views -> receive in results.

skviknesh
Автор

To convert the inputs to integer, the int() function works good, even with double quotes. Perhaps in this video, the refresh didn't work correctly.

Great explanation sir. I really like your tutorials.

subikeshps
Автор

When you add 5 plus 6 you get 56... this one was awesome Sir!!! Love your lectures....

talhatayyab
Автор

1:00 form
5:00 As a client, When you send a request to this server, you basically sending an object and that object will have some values (num1, num2)
When server send you value back, it will be in a format of response
7:40 <form action="add"> add 빼먹지 말자.
Thank you

victorystocktv
Автор

Anna, super anna! Chala baavunnai tutorials. Nee teaching, energy kuda adirindhi.

akashgillella
Автор

For those who are not getting the result page when clicked on submit please note that <form action ="add"> in this code it should be <form... Dont give any spaces after <... Hope this helps

christcentric
Автор

When 1st you didn't called for int of num1 a d num2 I just thought 'How a champ like you can miss it.' Letter I got this the way of your teaching. nice way

hasibjoy
Автор

Another solution to add numbers but not strings is to wrap variables in int() as we sum them.
In my case it was
c = int(a) + int(b)

olkhovskyrus
Автор

I am watching all videos of Python, but when result comes 56 it's make laugh for me. It's commonly happen with developers. I have also faced this type of incident, before 4 year ago when I am coding with PHP. But your tutorial is awesome. I have learned lot's of concept of Python. Thanks to making this tutorials.

himanshu_nishad
Автор

Hey, Navin! Is it absolutely necessary to have knowledge of HTML/CSS and JavaScript before starting Django or Can we learn it as we work on Django along the way? Your tutorials are awesome by the way. :)

siddiqzaryab
Автор

Awesome tutorial. I understood that once we practice Django more, we can play with it.

varunkrishnaKyathanpally
Автор

Excellent stuff... I always watch your tutorials whenever get stuck...

manpreetkaur
Автор

Great explanation and love the energy and passion which you teach :)

sauravrai
Автор

Thanks pro Excellent tutorial; I would rather name it {'resultVar':res} to be clear for the student and not confused . Thanks

abdelolayyan
Автор

Sir i did exact same things but still when I runserver i get 2:53 this exact issue plz help have almost spent an hour searching for the sol.

sayantanmitra
Автор

Video was super informative, but i dont think the second time u got 35 when adding 3 & 5 was because u needed to pass single quotes, I think it was just same cached pages

nrknithin
visit shbcf.ru