摘要: template部分: <el-avatar shape="square" :size="50" :fit="fit" :src="avatarImg" class="avatar-with-border-image"/> style部分: .avatar-with-border-image { p 阅读全文
posted @ 2024-11-09 17:21 lytcreate 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 装饰器如下: def calc_note_vip(view_func): def wrapper(request, *args, **kwargs): # 这里可以在视图函数执行前进行一些操作 response = view_func(request, *args, **kwargs) # 这里可以 阅读全文
posted @ 2024-11-09 13:50 lytcreate 阅读(3) 评论(0) 推荐(0) 编辑
摘要: def get_client_ip(request): x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR') if x_forwarded_for: ip = x_forwarded_for.split(',')[0] else: ip 阅读全文
posted @ 2024-11-09 00:46 lytcreate 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 代码如下: import geoip2.database def get_city_info(ip_address): reader = geoip2.database.Reader('C:\\Users\lytcreate\Downloads\\222\GeoLite2-City.mmdb') t 阅读全文
posted @ 2024-11-09 00:31 lytcreate 阅读(11) 评论(0) 推荐(0) 编辑