import static 1

import static

from django.conf.urls.static import static

Here is what the above code is Doing:
1. We’re importing the views from the blog application.
2. We’re assigning a view called post_list to the ^$ URL. This regular expression will match ^ (a beginning) followed by $ (an end) – so only an empty string will match. That’s correct, because in Django URL resolvers, ‘http://127.0.0.1:8000/’ is not a part of the URL. This pattern will tell Django that views.post_list is the right place to go if someone enters your website at the ‘http://127.0.0.1:8000/’ address.

Similar Posts