After going through Django Project's tutorial on creating a polling app, named polls, I started my own project on the same virtual environment, under another name. Now, what I did in my new app under the the index view, is still being only shown at http://127.0.0.1:8000/polls/ where it should be at http://127.0.0.1:8000/mynewproject/
I need help on correcting this, or is it a fact that on one virtual environment, I can work on one django project? And as a second question, should I be setting each project up on different virtual envs?
First Answer:
First I wan to mention these two things
manage.py.As you mentioned here you had created another app inside same project like this
So if you register urlpatterns for every particular apps like
and
then you have to include both of these
urls.pyfiles inprojects main urls.pylike thisor if you
don't wanna go like thisyou can registerboth url patternsin mainurls.pyfrom django.conf.urls import url, include from django.contrib import admin
So, that is it, you just have to deal with
urls.pyfiles.Second Answer: You can create multiple projects in single Virtual Environment. But configurations like packages and their versions stays same for all. If you make changes there (by upgrading, degrading, installing or uninstalling) then it will affect all projects inside that Virtual Env.