Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 460
Eugene Morozov Avatar asked Apr 23 '09 10:04

Eugene Morozov


1 Answers

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

like image 179
Alex Koshelev Avatar answered Sep 20 '22 02:09

Alex Koshelev