摘要: python manage.py makemigrations <appname> python manage.py migrate <appname> 阅读全文
posted @ 2020-07-06 18:53 市丸银 阅读(854) 评论(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] # 所以这里是真 阅读全文
posted @ 2020-07-06 16:48 市丸银 阅读(790) 评论(0) 推荐(0) 编辑
摘要: import uuid def get_mac_address(): node = uuid.getnode() mac = uuid.UUID(int=node).hex[-12:] print(mac) return mac get_mac_address() 阅读全文
posted @ 2020-07-06 15:47 市丸银 阅读(833) 评论(0) 推荐(0) 编辑