For some reason in my Django app, I used a redirect path as in my urls.py file, such that whenever someone visits example.com they would be redirected to example.com/blog
urlpatterns = [
path('admin/', admin.site.urls),
path('blog/', include('blog.urls', namespace='blog')),
path('', lambda request: redirect('blog/', permanent=True)),
]
Now I have constructed my site fully and added views for example.com. In order to visit that page I removed the line that redirects path from my code base so that it no longer redirects to /blog whenever I try to visit example.com.
path('', lambda request: redirect('blog/', permanent=True))
But the problem is that I'm still being redirected to /blog even after removing that above line.
The same problem persist to me even in entirely new django project. i.e. Even if I run another django project i can't visit "/" path it keeps being redirected to "/blog/". I think it is happening due to some thing related with permanent=True. Any help would be appreciated in reversing that effect.
Thanks in advance.