def url_segments(request):

	from urlparse import urlparse
	
	# convert the url path into a list	
	url_segment = request.path_info.strip("/").split("/")
	
	# assign each segment to it's on var
	url_segment_dict = {}
	for i in range(len(url_segment)):
		url_segment_dict["segment_%d" % (i+1)] = url_segment[i]
	
	return url_segment_dict