DEV Community

Gaurav-Shekhawat
Gaurav-Shekhawat

Posted on

Day 7 : Deep diving into Django Routes

How to run your django server for the first time? Use the below command :-

python manage.py runserver
Enter fullscreen mode Exit fullscreen mode

This will give you the IP address telling where your web app is currently running.


To create your very first app use:-

python manage.py startapp hello
Enter fullscreen mode Exit fullscreen mode

Now, to install this app into our project, go to settigs.py in the main parent directory, inside that update the list of INSTALLED_APPS.

From now on, our focus will be on the views.py file.


Implementing our Django app

You can think of each view as something a user might want to see. So, first we create a default view. The function accepts (request) as its argument. The request represents the HTTP request which the user made in order to access our web server.

Now update the urls.py files.

Top comments (0)