importos_used_port=os.environ.get("USED_PORT")if_used_port:try:SITE_ID=int(_used_port[-2:])+1# Used the last two numbers to build the IDexceptValueError,err:print"Error getting site ID from %r (error: %s)"%(_used_port,err)else:print"Used port is %r -> set SITE_ID: %s"%(_used_port,SITE_ID)else:SITE_ID=1

You can start more than one developer server, e.g.:

Start with SITE_ID == 1:

1

.../PyLucidTest/PyLucid_env$ ./manage.sh runserver 8000

After this you can start a second test server on different port. Open a second terminal and start the second test server:

1

.../PyLucidTest/PyLucid_env$ ./manage.sh runserver 8001

This starts a server with SITE_ID == 2.

Important: Before you can use a SITE ID > 1 you must login (on the site with ID==1) an create the site entries in the django admin panel.
The initial database fixtures does only create site ID 1!

setup

go into admin panel with url 127.0.0.1:8000/admin/

Add a new site (domain/name e.g: "127.0.0.1:8001")

different languages

If sites should have different system default languages you can do something like this in your local_settings.py: