0

I am using ATOM ide while I am running new project server it is opening the previous project urls.

I have tried restarting the editor and system also but still not working. Can anyone please advise. This is the new project running.enter image description here

 PS C:\Users\IBM_ADMIN\Desktop\Django_Projects\simplesocial> python manage.py  
 runserver
 Performing system checks...

 System check identified no issues (0 silenced).
 August 06, 2018 - 21:23:25
 Django version 1.11.13, using settings 'simplesocial.settings'
 Starting development server at http://127.0.0.1:8000/
 Quit the server with CTRL-BREAK
Sunny Prakash
  • 93
  • 1
  • 9

3 Answers3

0

inside via your picture, you include only 2 url paths

1. ^admin/
2. employee/

That means you have to add either after your (http://127.0.0.1:8000/ <===right here) or add a path inside your urls.py ===> urlpatterns and this is my list of url path

from django.contrib import admin
from django.urls import include, path

from pages.views import home_view, contact_view, about_view


urlpatterns = [
    path('blog/', include('blog.urls')),
    path('courses/', include('courses.urls')),
    path('products/', include('products.urls')),
    path('', home_view, name='home'),
    path('about/<int:id>/', about_view, name='product-detail'),
    path('contact/', contact_view),
    path('admin/', admin.site.urls),
]

and i'm pretty sure that your urls.py is located at C:\Users\IBM_ADMIN\Desktop\Django_Projects\simplesocial\urls.py or if you have add a extra path hope it will help you

Evancouver
  • 13
  • 1
  • 3
0

Did you copy your new project from your old project? If so, you may have .pyc files left over from the old project.

Try deleting your .pyc files (don't worry, Python will regenerate new ones from your .py files). Change to your projects root directory, delete all your .pyc files, and restart the devserver.

This is the command on Windows:

del /S *.pyc

This is the command on Mac/Linux:

find . -name "*.pyc" -exec rm -f {} \;

(See How do I remove all .pyc files from a project?)

Travis
  • 1,998
  • 1
  • 21
  • 36
0

Actually it's working by making this change to my older project

Previous urls.py

from django.conf.urls import url,include 
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'employee/',include('portal.urls'))
 ]

After adding ^ this before employee

  from django.conf.urls import url,include
  from django.contrib import admin

   urlpatterns = [
   url(r'^admin/', admin.site.urls),
    url(r'^employee/',include('portal.urls'))
     ]

The dev server start running urls for current project instead of the previous.This change is done in the older project for which I am receiving the urls.

Thanks to all for suggestion.

Sunny Prakash
  • 93
  • 1
  • 9