import random from django conf urls defaults import from core views im

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import random
from django.conf.urls.defaults import *
from core.views import *
def decide(*args):
def wrapped(*args_,**kwargs_):
return random.choice(args)(*args_, **kwargs_)
return wrapped
urlpatterns = patterns('',
# Example:
(r'^testapp/', decide(view1,view2)),
)