MacOS
M好爸爸
ios 开发工程师
展开
-
django shell python-mysqldb
步骤: 1、修改settings.py。在INSTALLED_APPS设置中添加“django.contrib.admin”。 2、运行python manage.py syncdb更新数据库 3、修改urls.py。改为: # Uncomment the next two lines to enable the admin: from django.contrib im原创 2015-05-12 15:38:32 · 389 阅读 · 0 评论 -
django python html css js
在django 框架下使用 css 和 js 或则使用静态库 不像 php 有根目录的概念,不过在django 中是包的概念,所以在引用这些包的时候需在django 中做一些配置。 (1)首先是配置setting.py 里 找到 TEMPLATE_DIRS 然后配置你的html的路径: 类似这样:TEMPLATE_DIRS = ( '/Users/JzhuiWeb/d原创 2015-05-12 15:37:56 · 716 阅读 · 0 评论 -
NSTableView and NSTextFiled
在TableCellView 中加NSTextFiled 时如果给NSTextFiled 添加mouseDown事件 最简单的设置是把NSTableView的SelectionHighlightStyle属性设置成NSTableViewSelectionHighlightStyleNone;原创 2015-05-12 14:59:53 · 349 阅读 · 0 评论 -
mac os python - mysql 安装
在安装好MySql 和django 后 , 如果 在安装python - mysqldb 出现以下问题的话 Downloading http://cheeseshop.python.org/packages/2.5/s/setuptools/setuptools-0.6c5-py2.5.egg sh: line 1: mysql_config: command not found Tra原创 2015-05-12 15:35:12 · 1181 阅读 · 0 评论 -
django shell python-mysqldb
安装完python-mysqldb 后 在shell 里运行 import MySQLdb 后如果出现下面错误: Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-1原创 2015-05-12 15:36:52 · 339 阅读 · 0 评论 -
NSWindow does not support utility styleMask 0x10
NSPanel是有utility这个style的,而NSWindow没有 , 先将这个window的class改成NSPanel,然后再将style改成regular,然后删除class名字NSPanel, 则自动变成NSWindow,这样就不会有警告了。原创 2015-05-12 15:02:48 · 1336 阅读 · 0 评论