Search code examples
pythondjangomercurial

How to set correct value for Django ROOT_URLCONF setting in different branches


I've put site directory created by django-admin startproject under version control (Mercurial). Let's say, the site is called frobnicator.

Now I want to make some serious refactoring, so I clone the site using command

hg clone frobnicator frobnicator-refactoring`

but ROOT_URLCONF in settings.py still says frobnicator.urls.

Is there a better way to overcome this problem rather than moving the site in a wrapper directory and storing this directory under version control (to maintain the same site name after branching) or using local branches?


Solution

  • Simply remove project name from the ROOT_URLCONF definition - it is optional. Then you can have project folders with different names.