Skip to content

Commit 50d18e3

Browse files
committed
修复ping_baidu命令错误
1 parent 9928460 commit 50d18e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

blog/management/commands/ping_baidu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from django.core.management.base import BaseCommand, CommandError
1717
from blog.models import Article, Tag, Category
18-
from DjangoBlog.spider_notify import sipder_notify
18+
from DjangoBlog.spider_notify import spider_notify
1919
from django.contrib.sites.models import Site
2020

2121
site = Site.objects.get_current().domain
@@ -35,7 +35,7 @@ def get_full_url(self, path):
3535
def handle(self, *args, **options):
3636
type = options['data_type']
3737
self.stdout.write('start get %s' % type)
38-
notify = sipder_notify()
38+
3939
urls = []
4040
if type == 'article' or type == 'all':
4141
for article in Article.objects.filter(status='p'):
@@ -50,5 +50,5 @@ def handle(self, *args, **options):
5050
urls.append(self.get_full_url(url))
5151

5252
self.stdout.write(self.style.SUCCESS('start notify %d urls' % len(urls)))
53-
notify.baidu_notify(urls)
53+
spider_notify.baidu_notify(urls)
5454
self.stdout.write(self.style.SUCCESS('finish notify'))

0 commit comments

Comments
 (0)