Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to have two different files for one project, using one of them all the time, but then invoking the second for development purposes?

What I want is this:

For production (and is live 24/7) I want the following links:

But for development (which I use the runserver now and then as I test) I want all the base links, plus a few more:

So effectively the outside world does not even know that my extra links exist since they don't have any access to them.

Is this even possible?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I would do it like this

In your set the following


then in your

from django.conf import settings
if settings.LOCAL_DEV:
  urlpatterns = patterns('',
   # all your other urls here for dev
share|improve this answer
Interesting. Thanks for the help. –  Garfonzo Aug 27 '11 at 21:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.