Skip to content

Commit

Permalink
mark.
Browse files Browse the repository at this point in the history
  • Loading branch information
bukun committed Dec 3, 2024
1 parent 1577cdf commit 2314aea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions djadmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,19 @@ scrapy genspider itcast \"itcast.cn\"
scrapy保存信息的最简单的方法主要有四种,-o
输出指定格式的文件,命令如下:

scrapy crawl itcast -o teachers.json
scrapy crawl itcast -o teachers.json

json lines格式,默认为Unicode编码

scrapy crawl itcast -o teachers.jsonl
scrapy crawl itcast -o teachers.jsonl

csv 逗号表达式,可用Excel打开

scrapy crawl itcast -o teachers.csv
scrapy crawl itcast -o teachers.csv

xml格式

scrapy crawl itcast -o teachers.xml
scrapy crawl itcast -o teachers.xml

**在cmd中创建Scrapy项目工程。**

Expand Down
6 changes: 5 additions & 1 deletion djadmin/cfg_foo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME': 'xx_db.sqlite3',
}
CACHES_INFO = {}
CACHES_INFO = {}


DEBUG_CFG = True
# DEBUG_CFG = False
6 changes: 3 additions & 3 deletions djadmin/public_model/literature_author/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class LiteratureAuthor(basemodel):
profession=models.CharField(blank=True, null=True, max_length=255, verbose_name="专业")
email=models.CharField(blank=True, null=True, max_length=255, verbose_name="邮箱")
tel=models.CharField(blank=True, null=True, max_length=255, verbose_name="电话")
cnt_md = MDTextField(verbose_name="简介", null=True, blank=True)
logo = models.ImageField(upload_to='author/imgs/', max_length=255, null=True, blank=True,
verbose_name="图片")
cnt_md = MDTextField(verbose_name="", null=True, blank=True)
cnt_html = MDTextField(verbose_name="结果", null=True, blank=True)
logo = models.ImageField(upload_to='author/imgs/', max_length=255, null=True, blank=True, verbose_name="图片")
sites = models.ManyToManyField(Site,blank=True, related_name='literature_author', verbose_name='Site')

def __str__(self):
Expand Down

0 comments on commit 2314aea

Please sign in to comment.