flask项目如何将config文件导入

app.config.from_object[config]

如下

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
最近做了一个文章管理的系统,用到在线编辑器,修改了一下现在能实现音频,视频,图片,附件,Flash等文件的上传。费了好大的功夫。。 FCKeditor应用在ASP.NET上,需要两组文件,一组是FCKeditor本身,另一个是用于ASP.NET的FCKeditor控件(分为1.1和2.0两个版本,这里使用2.0版本)。 1. 将FCKeditor加入到项目中 解压FCKeditor编辑器,得到文件夹fckeditor,复制此文件夹到Web应用的项目下(也可以是子孙目录下)。 解压FCKeditor控件,在其子目录bin/Release/2.0下有一个程序集。在Web应用的项目中引用该程序集。 2. 在页面中使用FCKeditor 有两种方式。 (1)手工编码 在页面中加入ASP.NET指令: 然后在需要的地方加入FCKeditor控件: (2)集成到Visual Studio工具箱 打开一ASP.NET页面,展开Toolbox,打开右键菜单,选择“Choose Items ...”,在出现的“Choose Toolbox Items”会话框的“.NET Framework Components”选项卡中选择“Browse”,找到并选中FCKeditor程序集,打开后回到“Choose Toolbox Items”窗口,点击“OK”,完成控件导入。 这时,在Toolbox的General分类下出现了一个名为FCKeditor的控件,可以像使用Visual Studio内置控件一样使用它。 3. 配置FCKeditor编辑器路径 在页面中,使用的是FCKeditor控件,该控件需要知道FCKeditor编辑器文件组的路径。有两种配置方法。 (1)配置web.config 在appSettings配置节中加入 使用这种配置方法后,对于项目中任何一个页面中用到的FCKeditor控件,都不用再配置其BasePath属性。 (2)直接对用到的FCKeditor控件进行配置 在页面代码中设置FCKeditor的属性BasePath为FCKeditor编辑器文件组的路径,或者在Page_Init事件处理器中设置其BasePath的值。 4. 配置FCKeditor编辑器文件上传路径 在web.config的appSettings配置节中加入 或者 这样,就完成了FCKeditor向ASP.NET页面的集成工作。 二、配置FCKeditor 按照FCKeditor的默认配置,可以完成一些常用的HTML可视化编辑工作,但在实际应用中,还需要对其做进一步的配置。FCKeditor控件的可配置属性不多,且配置后只能作用于一个单一实例。实际上,需要对FCKeditor编辑器文件组中的通用配置文件/fckconfig.js和ASP.NET专用文件上传管理代码文件/editor/filemanager/connectors/aspx/config.ascx进行配置。 1. 配置控件语言 FCKeditor是自动探测浏览器所使用的语言编码的,其默认语言是英文。修改配置行"FCKConfig.DefaultLanguage = 'en';"为'zh-cn',采用中文为默认语言。 2. 配置控件应用技术 FCKeditor默认是用于php技术的。修改配置行"var _FileBrowserLanguage = 'php';"和"var _
调通sina33下的AP6212A0(WIFI+BT) 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/28 12:13 版本:V1.3 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16平台的parrotv1.1的官方SDK(Android4.4.2) 1、打开AP6212的BT,关闭rtl8723bs的BT(其它都是按照比对软件的字母顺序了): [ 3.141273] Bluetooth: HCI UART driver ver 2.2 [ 3.146210] Bluetooth: HCI H4 protocol initialized [ 3.151563] Bluetooth: HCI BCSP protocol initialized [ 3.157154] usbcore: registered new interface driver btusb [ 3.163282] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.169599] Bluetooth: BlueSleep Mode Driver Ver 1.1 [ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] Bluetooth: RFCOMM ver 1.11 [ 3.968340] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol multicast [ 3.995242] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 4.001921] L2TP core driver, V2.0 [ 4.005706] PPPoL2TP kernel driver, V2.0 [ 4.010070] L2TP IP encapsulation support (L2TPv3) [ 4.015468] L2TP netlink interface [ 4.019264] L2TP ethernet pseudowire support (L2TPv3) [ 4.023860] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 4.023929] [mmc]: mclk 0xf1c20090 0xc100000b [ 4.040272] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.048780] ThumbEE CPU extension supported. [ 4.053550] Registering SWP/SWPB emulation handler [ 4.059269] [rfkill]: rfkill set power 1 [ 4.063652] gpio ap6xxx_bt_regon set val 0, act val 0 正常启动的BT加载: [ 3.207764] Bluetooth: HCI UART driver ver 2.2 [ 3.212725] Bluetooth: HCI H4 protocol initialized [ 3.218045] Bluetooth: HCI BCSP protocol initialized [ 3.223671] us
以3650为例:(适用于大部分接入层网络设备,TFTP最好使用tftp32,可以支持大文件) 1、查看3650IOS信息 WH-KJY-HJ-B16-3650-01#sh flash Directory of flash:/ 2 -rwx 1036 Feb 7 2012 13:39:20 +08:00 vlan.dat 3 -rwx 5 Oct 25 2012 16:11:52 +08:00 private-config.text 5 -rwx 7691 Oct 25 2012 16:11:52 +08:00 config.text 6 drwx 192 Mar 1 1993 08:07:03 +08:00 c3650-ipservices-mz.122-35.SE5 15998976 bytes total (5480960 bytes free) 2、由于flash空间不够无法导入新版本的IOS,所以只能删除旧的IOS版本 WH-KJY-HJ-B16-3650-01#cd flash:/c3650-ipservices-mz.122-35.SE5 //进入旧的目录下删除 WH-KJY-HJ-B16-3650-01#dir Directory of flash:/c3650-ipservices-mz.122-35.SE5/ 7 -rwx 8054867 Mar 1 1993 08:05:34 +08:00 c3650-ipservices-mz.122-35.SE5.bin 8 drwx 4224 Mar 1 1993 08:05:57 +08:00 html 509 -rwx 616 Mar 1 1993 08:07:03 +08:00 info 15998976 bytes total (5480960 bytes free) #delete flash:/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin //删除旧IOS版本(注意在操作这步前,将之前的IOS备份一份保存,以便出现问题可以回退) Delete filename [/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin]? Delete flash:/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin? [confirm] 删除完成后查看flash信息: WH-KJY-HJ-B16-3650-01#sh flash Directory of flash:/c3650-ipservices-mz.122-35.SE5/ 8 drwx 4224 Mar 1 1993 08:05:57 +08:00 html 509 -rwx 616 Mar 1 1993 08:07:03 +08:00 info 15998976 bytes total (13536256 bytes free) 3、导入新的IOS #copy tftp: c3650-ipservicesk9-mz.122-40.SE.bin flash: c3650-ipservicesk9-mz.122-40.SE.bin 4、查看新的IOS导入后flash信息 WH-KJY-HJ-B16-3650-01#sh flash Directory of flash:/ 2 -rwx 1036 Feb 7 2012 13:39:20 +08:00 vlan.dat 3 -rwx 5 Oct 25 2012 16:11:52 +08:00 private-config.text 4 -rwx 9975530 Mar 5 2013 17:59:01 +08:00 c3650-ipservicesk9-mz.122-40.SE.bin 5 -rwx 7691 Oct 25 2012 16:11:52 +08:00 config.text 6 drwx 128 Mar 5 2013 17:53:23 +08:00

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值