完善了首页和关于前端页面,以及解决了图片存储方案问题
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import urllib.parse
|
||||
|
||||
|
||||
class UnicodeSlugConverter:
|
||||
"""
|
||||
支持中文 slug 的路径转换器
|
||||
匹配除 / 之外的任意字符
|
||||
"""
|
||||
regex = '[^/]+'
|
||||
|
||||
def to_python(self, value):
|
||||
return urllib.parse.unquote(value)
|
||||
|
||||
def to_url(self, value):
|
||||
return urllib.parse.quote(value)
|
||||
Reference in New Issue
Block a user