摘要:
template部分: <el-avatar shape="square" :size="50" :fit="fit" :src="avatarImg" class="avatar-with-border-image"/> style部分: .avatar-with-border-image { p 阅读全文
摘要:
装饰器如下: def calc_note_vip(view_func): def wrapper(request, *args, **kwargs): # 这里可以在视图函数执行前进行一些操作 response = view_func(request, *args, **kwargs) # 这里可以 阅读全文
摘要:
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 阅读全文
摘要:
代码如下: import geoip2.database def get_city_info(ip_address): reader = geoip2.database.Reader('C:\\Users\lytcreate\Downloads\\222\GeoLite2-City.mmdb') t 阅读全文