django - Options to map new URL Patterns to Existing Code -


i have new caller can call application in specific new url pattern:-

applicationpath?send=n&msg=<messagecontent>&dest=<phone>&stime=mm/dd/yy hh:mm:ss pm/am&operator=p&circle=q 

my existing urlconf calls different methods based on message text:-

(('api/(?p<phone>\w+)/messagea', handle_a_message),  ('api/(?p<phone>\w+)/messageb', handle_b_message),   ...) 

i can think of writing urlconf redirects these methods along these lines:-

(('applicationpath?send=n&msg=messagea&dest=(?p<phone>\w+)/\w+', handle_a_message),  ('applicationpath?send=n&msg=messageb&dest=(?p<phone>\w+)/\w+', handle_b_message),  ...) 

are there simpler recommended alternatives missing? redirection best alternative?


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -