We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed8c287 commit 5d196b7Copy full SHA for 5d196b7
apps/blog/views.py
@@ -75,6 +75,8 @@ def get_context_data_all(**kwargs):
75
for visitor in visitor_ip:
76
ip_split = visitor.ip.split('.')
77
visitor.ip = '%s.*.*.%s' % (ip_split[0], ip_split[3])
78
+ if not visitor.city:
79
+ visitor.city = visitor.country
80
kwargs['visitor_ip'] = visitor_ip
81
kwargs['visitor_num'] = cache.get('visitor_num')
82
recent_comment = BlogComment.objects.order_by('-created_time')[:5]
0 commit comments