I am new to Django, I have started learning just a week ago. I am taking the reference of Django Docs, but I can’t understand how to give url to an app. So can anybody please tell me how to give url to an app with description?
for example:- If I want to make a login form and when I click on login button it goes to the home page.
Django is a web framework
A web framework carry out common works for you(the web developer)
One of the common works is resolving the http request
One of the resolving is direct the request pointing to a URL to a specific piece of code which handles this request and generate the response.
We sometime call the stuff carrying out the above mechanism a URL router of the web framework. The piece of code in Django is a function(which generate a http response), we call it the view.
So we say the framework’s URL router map a URL to a view.
You tell the router what URL maps to what view by listing your url-view mappings in the solo urls.py in the root directory of your project
If you dislike the solo urls.py being too large, you can split this file into multiple files, and put them in individual Apps directory. Then by using include syntax you aggregate them into the solo urls.py