简体   繁体   中英

How to define (string+int+…) URL Pattern RegEx Django

my url : http://127.0.0.1:8000/avatar/Z0FBQUFBQlhuZWI3ejVzTU10TUwyY0twMFJqZHM5MU1LajdEVnJfSzVWN3RXcUFya00wZjdLOUZmbjBzUG5ZSldibkNXeEtMQ1dsZnE4WXlRd0lNLXllRXhNbS1CUWdFSnc9PQ==

url pattern : url(r'^avatar/(?P<avaID>\\w+)$', ReportsController.UserImage),

"w+" this means just string or "d+" this means just digit but i need in url with all character in url pattern django how?

Then match every character using . :

 url(r'^avatar/(?P<avaID>.+)$', ReportsController.UserImage)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM