Redirecting to same url that doesn't exists in project

Hello,

For some requirement i have downloaded some django project from github and executed in my laptop, and then removed that, later i have created my own project and started it, when i requested the page it is redirecting to earlier project url , i dont have that url in app but still.

I have removed all my projects and uninstalled django , then install latest and created project and started immediately and requested the page but still same url it is redirecting im not understanding why it was happening.
Im i hacked.

Please help me

We would need to see a lot more detail to try and diagnose this.

Lets start with seeing your settings file, the urls.py file being referenced there, the specific url that you are requesting, the url you’re being redirected to, and probably the runserver log from what you’re running.

When you’re posting the file contents here, please enclose them between two lines consisting of only three backtick - ` characters. This means you’ll have a line that is only ```, followed by the lines of the file, followed by another line of ```. (Make sure you’re using the backtick character - ` and not the apostrophe - '.)

Also, it might be helpful to see the commands you issued to perform some of the steps you’ve described, rather than just a description of what you’ve tried to do.

Hi,
Thanks for your reply.

It is just a new project.below are the commands have executed.
Django-admin startproject jango
Cd jango
Python manage.py startapp display
Then in settings.py i have include my app, display
Then i have started the server
Python manage.py runserver

Here it is going to same url something like /testapp/forms/
As the page is not exists an 404 error im recieving

I tried change that url to root in the browser but still it is going back to same url.

Also i have executed the migrate command there it was migrated auth ,session , and logs , some more apps .
Then started the server but same problem

Admin page is working.
There is no other changes i have made.

Earlier it was fine, im able to execute my project and changing the urls, until i executed code from github.

Ok, that’s a start - we need to see the contents of the files I’ve listed above.

Hi,

front end request

The commands i have executed.

below is project url.

Settings file

Ok, it’s not redirecting you anywhere. A redirect would show a response code 30x. What you’re getting is a standard 404 - URL not found.

It’s telling you that you don’t have any URLs defined in your urls.py file to know what to do with the url testapp/form/

Also, in the future, please do not post images of code and files - they’re not readable by everyone on every device being used to view this site.

If you haven’t yet worked your way through either the Django Tutorial or the Django Girls Tutorial, this would be a good time to do that. It’ll give you a good fundamental understanding of how applications fit together within the framework.

I faced the same issue in Chrome. I was following the MDN Library Management tutorial(catalog). Even after stopping the catalog application server, it was redirecting localhost:8000 to localhost:8000/catalog. My new application homepage was not being rendered. My new application home page was rendering correctly in a new browser application(Firefox).

So I visited Chrome Settings → Privacy and Security → Delete Browsing Data. And cleared Cached images and files.

After this my old browser(Chrome) rendered my new application home page correctly.

Hope this helps.