查看文章
 
satchmo安装
2009年06月20日 11:55

satchmo安装

软件需求

主要软件

  • python-2.5.2.msi :http://www.python.org/download/
  • django     svn 版本 :http://code.djangoproject.com/svn/django/trunk
  • satchmo svn 版本   svn://satchmoproject.com/satchmo/trunk

其他软件

安装
python 的安装相对大概有两种方式:

  • exe安装
  • setup.py install 源码安装

安装步骤

  1. 安装python-2.5.2
  2. 安装Docutils
  3. 按住 “其他软件”中的其他软件。
  4. 在一个目录src,(具体位置任选,比如 F:/src )
  5. 拷贝django 目录到src目录下。(django指的是代码目录,和docs并列的django)


创建工程

  • 创建cfg.bat ,内容如下 (在f:/src 目录下)

               -----------------------------------------------------------------
           set PYTHONPATH=F:\src

  •    命令行下,执行下面命令

              f:\src>cfg.bat
              f:\src>python django/bin/django-admin.py startproject mystore

              经过上面步骤,就会创建,f:/src/mystore 目录

  • 修改setting.py 文件,见附件
  • 拷贝文件:

             [f:\src]copy "satchmo/local_settings-customize.py" "satchmo/local_settings.py"
            
             [f:\src\mystore]python manage.py satchmo_copy_urls
             Copied F:\src\satchmo\urls.py to F:\src\mystore\satchmo-urls.py
            
             [f:\src\mystore]copy urls.py urls.py.orig
             F:\src\mystore\urls.py => F:\src\mystore\urls.py.orig    1 file copied
            
             [f:\src\mystore]copy satchmo-urls.py urls.py
             F:\src\mystore\satchmo-urls.py => F:\src\mystore\urls.py 1 file copied

  • 静态文件拷贝

                 [f:\src\mystore]python manage.py satchmo_copy_static
                 Copied F:\src\satchmo\static to F:\src\mystore\static
                
                 [f:\src\mystore]python manage.py satchmo_copy_templates
                 Copied F:\src\satchmo\templates to F:\src\mystore\templates

  • 测试 (satchmo 提供的这个工具非常好)

                [f:\src\mystore]python manage.py satchmo_check
                Checking your satchmo configuration.
                Your configuration has no errors.

  • 同步数据库(如何配置mysql数据库,请看其他文档)

               [f:\src\mystore]python manage.py syncdb

  • 国际化配置

                [f:\src\mystore]python manage.py satchmo_load_l10n

  • 装载商店数据

              [f:\satchmo_shop\mystore]python manage.py satchmo_load_store

  • 启动测试服务

            [f:\src\mystore]python manage.py runserver
        测试一下,看是不是已经工作了。
setting.py


类别:python, webframework,django||添加到搜藏 |分享到i贴吧|浏览(366)|评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu