[
  {
    "path": ".gitattributes",
    "content": "*.js linguist-language=Python\n"
  },
  {
    "path": "README.md",
    "content": "# fruits-and-vegetables\n基于python3.6和Django1.8.2\n\n使用Python Web框架Django开发的一个B2C网上蔬果商城，包含用户、商品、购物车、订单等模块等等，使用了Celery异步任务队列，MySQL数据库，Redis数据库，FastDFS分布式的图片存储服 务，Nginx负载均衡服务器，uWSGI应用服务器。\n# 项目总结\n1.\t生鲜类产品  B2C  PC电脑端网页\n2.\t功能模块：用户模块  商品模块（首页、 搜索、商品） 购物车模块  订单模块（下单、 支付）\n3.\t用户模块：注册、登录、激活、退出、个人中心、地址\n4.\t商品模块：首页、详情、列表、搜索（haystack+whoosh）\n5.\t购物车： 增加、删除、修改、查询\n6.\t订单模块：确认订单页面、提交订单（下单）、请求支付、查询支付结果、评论\n7.\tdjango默认的认证系统 AbstractUser\n8.\titsdangerous  生成签名的token （序列化工具 dumps  loads）\n9.\t邮件 （django提供邮件支持 配置参数  send_mail）\n10.\t celery (重点  整体认识 异步任务)\n11.\t 页面静态化 （缓解压力  celery  nginx）\n12.\t 缓存（缓解压力， 保存的位置、有效期、与数据库的一致性问题）\n13.\t FastDFS (分布式的图片存储服务， 修改了django的默认文件存储系统)\n14.\t 搜索（ whoosh  索引  分词）\n15.\t 购物车redis 哈希 历史记录redis list\n16.\t ajax 前端用ajax请求后端接口\n17.\t 事务\n18.\t 高并发的库存问题 （悲观锁、乐观锁）\n19.\t 支付的使用流程\n20.\t nginx （负载均衡  提供静态文件）\n\n# 安装\n使用pip安装：pip install -r requirements.txt\n\n# 配置\n## uwsgi\n遵循wsgi协议的web服务器。\n### uwsgi的安装\n\tpip install uwsgi\n### uwsgi的配置\n项目部署时，需要把settings.py文件夹下的：\n    DEBUG=FALSE\n    ALLOWED_HOSTS=[‘*’] \n    \n    [uwsgi]\n    #使用nginx连接时使用\n    #socket=127.0.0.1:8080\n    #直接做web服务器使用\n    http=127.0.0.1:8080\n    #项目目录\n    chdir=/Users/smart/Desktop/dj/bj17/dailyfresh\n    #项目中wsgi.py文件的目录，相对于项目目录\n    wsgi-file=dailyfresh/wsgi.py\n    processes=4\n    threads=2\n    master=True\n    pidfile=uwsgi.pid\n    daemonize=uwsgi.log\n    virtualenv=/Users/smart/.virtualenvs/dailyfresh\n### uwsgi的启动和停止\n启动:uwsgi –-ini 配置文件路径 例如:uwsgi --ini uwsgi.ini\n\n停止:uwsgi --stop uwsgi.pid路径 例如:uwsgi --stop uwsgi.pid\n## nginx\nNginx (engine x) 是一个高性能的HTTP和反向代理web服务器\n### nginx 配置转发请求给uwsgi\n    location / {\n    \tinclude uwsgi_params;\n    \tuwsgi_pass uwsgi服务器的ip:port;\n    }\n### nginx配置处理静态文件\ndjango settings.py中配置收集静态文件路径:\n\n\n- STATIC_ROOT=收集的静态文件路径 例如:/var/www/dailyfresh/static;\n\ndjango 收集静态文件的命令:\n\n    python manage.py collectstatic\n执行上面的命令会把项目中所使用的静态文件收集到STATIC_ROOT指定的目录下。\n\n收集完静态文件之后,让nginx提供静态文件，需要在nginx配置文件中增加如下配置:\n\n    location /static {\n    \talias /var/www/dailyfresh/static/;\n    }\n### nginx转发请求给另外地址\n在location 对应的配置项中增加 proxy_pass 转发的服务器地址。\n如当用户访问127.0.0.1时，在nginx中配置把这个请求转发给172.16.179.131:80(nginx)服务器，让这台服务器提供静态首页。\n配置如下:\n\n    location = /{\n    \tproxy_pass http://172.16.179.131;\n    }\n### nginx配置upstream实现负载均衡\nngnix 配置负载均衡时，在server配置的前面增加upstream配置项。\n\n    upstream dailyfresh {\n    \tserver 127.0.0.1:8080;\n    \tserver 127.0.0.1:8081;\n    }\n"
  },
  {
    "path": "dailyfresh/.idea/dailyfresh.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"PYTHON_MODULE\" version=\"4\">\n  <component name=\"FacetManager\">\n    <facet type=\"django\" name=\"Django\">\n      <configuration>\n        <option name=\"rootFolder\" value=\"$MODULE_DIR$\" />\n        <option name=\"settingsModule\" value=\"dailyfresh/settings.py\" />\n        <option name=\"manageScript\" value=\"manage.py\" />\n        <option name=\"environment\" value=\"&lt;map/&gt;\" />\n        <option name=\"doNotUseTestRunner\" value=\"false\" />\n        <option name=\"trackFilePattern\" value=\"migrations\" />\n      </configuration>\n    </facet>\n  </component>\n  <component name=\"NewModuleRootManager\">\n    <content url=\"file://$MODULE_DIR$\" />\n    <orderEntry type=\"jdk\" jdkName=\"Python 3.5 (pytest)\" jdkType=\"Python SDK\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n  </component>\n  <component name=\"TemplatesService\">\n    <option name=\"TEMPLATE_CONFIGURATION\" value=\"Django\" />\n  </component>\n  <component name=\"TestRunnerService\">\n    <option name=\"PROJECT_TEST_RUNNER\" value=\"Unittests\" />\n  </component>\n</module>"
  },
  {
    "path": "dailyfresh/.idea/dictionaries/smart.xml",
    "content": "<component name=\"ProjectDictionaryState\">\n  <dictionary name=\"smart\" />\n</component>"
  },
  {
    "path": "dailyfresh/.idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectInspectionProfilesVisibleTreeState\">\n    <entry key=\"Project Default\">\n      <profile-state>\n        <expanded-state>\n          <State>\n            <id />\n          </State>\n        </expanded-state>\n        <selected-state>\n          <State>\n            <id>AngularJS</id>\n          </State>\n        </selected-state>\n      </profile-state>\n    </entry>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" project-jdk-name=\"Python 3.5 (pytest)\" project-jdk-type=\"Python SDK\" />\n  <component name=\"masterDetails\">\n    <states>\n      <state key=\"ScopeChooserConfigurable.UI\">\n        <settings>\n          <splitter-proportions>\n            <option name=\"proportions\">\n              <list>\n                <option value=\"0.2\" />\n              </list>\n            </option>\n          </splitter-proportions>\n        </settings>\n      </state>\n    </states>\n  </component>\n</project>"
  },
  {
    "path": "dailyfresh/.idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/.idea/dailyfresh.iml\" filepath=\"$PROJECT_DIR$/.idea/dailyfresh.iml\" />\n    </modules>\n  </component>\n</project>"
  },
  {
    "path": "dailyfresh/.idea/workspace.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ChangeListManager\">\n    <list default=\"true\" id=\"8237aec5-5bff-4b6f-a21a-cd6747db5f5d\" name=\"Default\" comment=\"\" />\n    <ignored path=\"dailyfresh.iws\" />\n    <ignored path=\".idea/workspace.xml\" />\n    <ignored path=\".idea/dataSources.local.xml\" />\n    <option name=\"EXCLUDED_CONVERTED_TO_IGNORED\" value=\"true\" />\n    <option name=\"SHOW_DIALOG\" value=\"false\" />\n    <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\n    <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\n    <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\n  </component>\n  <component name=\"CreatePatchCommitExecutor\">\n    <option name=\"PATCH_PATH\" value=\"\" />\n  </component>\n  <component name=\"DjangoConsoleOptions\" custom-start-script=\"import sys; print('Python %s on %s' % (sys.version, sys.platform))&#10;import django; print('Django %s' % django.get_version())&#10;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])&#10;if 'setup' in dir(django): django.setup()&#10;import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)\">\n    <option name=\"myCustomStartScript\" value=\"import sys; print('Python %s on %s' % (sys.version, sys.platform))&#10;import django; print('Django %s' % django.get_version())&#10;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])&#10;if 'setup' in dir(django): django.setup()&#10;import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)\" />\n  </component>\n  <component name=\"FavoritesManager\">\n    <favorites_list name=\"dailyfresh\" />\n  </component>\n  <component name=\"FileEditorManager\">\n    <leaf SIDE_TABS_SIZE_LIMIT_KEY=\"375\">\n      <file pinned=\"false\" current-in-tab=\"true\">\n        <entry file=\"file://$PROJECT_DIR$/uwsgi.log\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"-781\">\n              <caret line=\"1140\" column=\"40\" selection-start-line=\"1140\" selection-start-column=\"40\" selection-end-line=\"1140\" selection-end-column=\"40\" />\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/uwsgi2.log\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"-1555\" />\n          </provider>\n        </entry>\n      </file>\n    </leaf>\n  </component>\n  <component name=\"FileTemplateManagerImpl\">\n    <option name=\"RECENT_TEMPLATES\">\n      <list>\n        <option value=\"Python Script\" />\n        <option value=\"HTML File\" />\n      </list>\n    </option>\n  </component>\n  <component name=\"FindInProjectRecents\">\n    <findStrings>\n      <find>Address</find>\n      <find>GoodsSKU</find>\n    </findStrings>\n  </component>\n  <component name=\"IdeDocumentHistory\">\n    <option name=\"CHANGED_PATHS\">\n      <list>\n        <option value=\"$PROJECT_DIR$/db/base_model.py\" />\n        <option value=\"$PROJECT_DIR$/dailyfresh/__init__.py\" />\n        <option value=\"$USER_HOME$/.virtualenvs/bj16_py3/lib/python3.5/site-packages/django/views/generic/base.py\" />\n        <option value=\"$PROJECT_DIR$/static/detail.html\" />\n        <option value=\"$PROJECT_DIR$/templates/base_no_cart.html\" />\n        <option value=\"$PROJECT_DIR$/templates/register.html\" />\n        <option value=\"$PROJECT_DIR$/apps/user/models.py\" />\n        <option value=\"$PROJECT_DIR$/static/css/main.css\" />\n        <option value=\"$PROJECT_DIR$/templates/user_center_site.html\" />\n        <option value=\"$PROJECT_DIR$/templates/login.html\" />\n        <option value=\"$PROJECT_DIR$/templates/static_base.html\" />\n        <option value=\"$PROJECT_DIR$/templates/static_index.html\" />\n        <option value=\"$PROJECT_DIR$/apps/goods/admin.py\" />\n        <option value=\"$PROJECT_DIR$/templates/index.html\" />\n        <option value=\"$PROJECT_DIR$/templates/base_detail_list.html\" />\n        <option value=\"$PROJECT_DIR$/apps/goods/views.py\" />\n        <option value=\"$PROJECT_DIR$/templates/list.html\" />\n        <option value=\"$PROJECT_DIR$/apps/goods/search_indexes.py\" />\n        <option value=\"$PROJECT_DIR$/templates/search/indexes/goods/goodssku_text.txt\" />\n        <option value=\"$PROJECT_DIR$/dailyfresh/urls.py\" />\n        <option value=\"$PROJECT_DIR$/templates/search/search.html\" />\n        <option value=\"$PROJECT_DIR$/utils/mixin.py\" />\n        <option value=\"$PROJECT_DIR$/apps/cart/urls.py\" />\n        <option value=\"$PROJECT_DIR$/templates/cart.html\" />\n        <option value=\"$PROJECT_DIR$/apps/cart/views.py\" />\n        <option value=\"$PROJECT_DIR$/templates/base.html\" />\n        <option value=\"$PROJECT_DIR$/templates/base_user_center.html\" />\n        <option value=\"$PROJECT_DIR$/apps/order/models.py\" />\n        <option value=\"$PROJECT_DIR$/templates/place_order.html\" />\n        <option value=\"$PROJECT_DIR$/apps/order/migrations/alipay_public_key.pem\" />\n        <option value=\"$PROJECT_DIR$/apps/goods/urls.py\" />\n        <option value=\"$PROJECT_DIR$/templates/user_center_order.html\" />\n        <option value=\"$PROJECT_DIR$/templates/detail.html\" />\n        <option value=\"$PROJECT_DIR$/apps/order/views.py\" />\n        <option value=\"$PROJECT_DIR$/utils/fdfs/storage.py\" />\n        <option value=\"$PROJECT_DIR$/templates/user_center_info.html\" />\n        <option value=\"$PROJECT_DIR$/apps/goods/models.py\" />\n        <option value=\"$PROJECT_DIR$/apps/user/views.py\" />\n        <option value=\"$PROJECT_DIR$/static/test.html\" />\n        <option value=\"$PROJECT_DIR$/celery_tasks/tasks.py\" />\n        <option value=\"$PROJECT_DIR$/apps/order/urls.py\" />\n        <option value=\"$PROJECT_DIR$/apps/user/urls.py\" />\n        <option value=\"$PROJECT_DIR$/uwsgi2.pid\" />\n        <option value=\"$PROJECT_DIR$/uwsgi.ini\" />\n        <option value=\"$PROJECT_DIR$/dailyfresh/settings.py\" />\n        <option value=\"$PROJECT_DIR$/utils/fdfs/client.conf\" />\n        <option value=\"$PROJECT_DIR$/uwsgi2.ini\" />\n      </list>\n    </option>\n  </component>\n  <component name=\"ProjectFrameBounds\" extendedState=\"6\">\n    <option name=\"x\" value=\"65\" />\n    <option name=\"y\" value=\"-4\" />\n    <option name=\"width\" value=\"735\" />\n    <option name=\"height\" value=\"604\" />\n  </component>\n  <component name=\"ProjectView\">\n    <navigator proportions=\"\" version=\"1\">\n      <foldersAlwaysOnTop value=\"true\" />\n    </navigator>\n    <panes>\n      <pane id=\"ProjectPane\">\n        <subPane>\n          <expand>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"apps\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"apps\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"goods\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"apps\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"order\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"apps\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"user\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"celery_tasks\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"utils\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n            <path>\n              <item name=\"dailyfresh\" type=\"b2602c69:ProjectViewProjectNode\" />\n              <item name=\"dailyfresh\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"utils\" type=\"462c0819:PsiDirectoryNode\" />\n              <item name=\"fdfs\" type=\"462c0819:PsiDirectoryNode\" />\n            </path>\n          </expand>\n          <select />\n        </subPane>\n      </pane>\n      <pane id=\"Scope\" />\n    </panes>\n  </component>\n  <component name=\"PropertiesComponent\">\n    <property name=\"DefaultHtmlFileTemplate\" value=\"HTML File\" />\n    <property name=\"WebServerToolWindowFactoryState\" value=\"false\" />\n    <property name=\"js-jscs-nodeInterpreter\" value=\"/usr/local/bin/node\" />\n    <property name=\"last_opened_file_path\" value=\"$PROJECT_DIR$\" />\n    <property name=\"node.js.detected.package.eslint\" value=\"true\" />\n    <property name=\"node.js.path.for.package.eslint\" value=\"project\" />\n    <property name=\"node.js.selected.package.eslint\" value=\"(autodetect)\" />\n    <property name=\"settings.editor.selected.configurable\" value=\"editor.preferences.fonts.default\" />\n  </component>\n  <component name=\"RecentsManager\">\n    <key name=\"CopyFile.RECENT_KEYS\">\n      <recent name=\"$PROJECT_DIR$\" />\n      <recent name=\"$PROJECT_DIR$/templates\" />\n      <recent name=\"$PROJECT_DIR$/apps/order\" />\n      <recent name=\"$PROJECT_DIR$/templates/search\" />\n      <recent name=\"$PROJECT_DIR$/utils/fdfs\" />\n    </key>\n    <key name=\"MoveFile.RECENT_KEYS\">\n      <recent name=\"$PROJECT_DIR$/apps/order\" />\n      <recent name=\"$PROJECT_DIR$/apps\" />\n    </key>\n  </component>\n  <component name=\"RunDashboard\">\n    <option name=\"ruleStates\">\n      <list>\n        <RuleState>\n          <option name=\"name\" value=\"ConfigurationTypeDashboardGroupingRule\" />\n        </RuleState>\n        <RuleState>\n          <option name=\"name\" value=\"StatusDashboardGroupingRule\" />\n        </RuleState>\n      </list>\n    </option>\n  </component>\n  <component name=\"RunManager\">\n    <configuration default=\"true\" type=\"tests\" factoryName=\"Attests\">\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs />\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"\" />\n      <option name=\"IS_MODULE_SDK\" value=\"false\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <module name=\"dailyfresh\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" enabled=\"false\" sample_coverage=\"true\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"\" />\n      <option name=\"CLASS_NAME\" value=\"\" />\n      <option name=\"METHOD_NAME\" value=\"\" />\n      <option name=\"FOLDER_NAME\" value=\"\" />\n      <option name=\"TEST_TYPE\" value=\"TEST_SCRIPT\" />\n      <option name=\"PATTERN\" value=\"\" />\n      <option name=\"USE_PATTERN\" value=\"false\" />\n      <method />\n    </configuration>\n    <configuration name=\"dailyfresh\" type=\"Python.DjangoServer\" factoryName=\"Django server\">\n      <module name=\"dailyfresh\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"\" />\n      <option name=\"IS_MODULE_SDK\" value=\"false\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <option name=\"launchJavascriptDebuger\" value=\"false\" />\n      <option name=\"port\" value=\"8000\" />\n      <option name=\"host\" value=\"\" />\n      <option name=\"additionalOptions\" value=\"\" />\n      <option name=\"browserUrl\" value=\"\" />\n      <option name=\"runTestServer\" value=\"false\" />\n      <option name=\"runNoReload\" value=\"false\" />\n      <option name=\"useCustomRunCommand\" value=\"false\" />\n      <option name=\"customRunCommand\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <configuration default=\"true\" type=\"js.build_tools.gulp\">\n      <node-interpreter>project</node-interpreter>\n      <node-options />\n      <gulpfile />\n      <tasks />\n      <arguments />\n      <envs />\n      <method v=\"2\" />\n    </configuration>\n  </component>\n  <component name=\"SvnConfiguration\">\n    <configuration />\n  </component>\n  <component name=\"TaskManager\">\n    <task active=\"true\" id=\"Default\" summary=\"Default task\">\n      <changelist id=\"8237aec5-5bff-4b6f-a21a-cd6747db5f5d\" name=\"Default\" comment=\"\" />\n      <created>1510566739293</created>\n      <option name=\"number\" value=\"Default\" />\n      <option name=\"presentableId\" value=\"Default\" />\n      <updated>1510566739293</updated>\n      <workItem from=\"1558708296375\" duration=\"85000\" />\n      <workItem from=\"1558746359408\" duration=\"450000\" />\n      <workItem from=\"1558750380836\" duration=\"15877000\" />\n      <workItem from=\"1558845644952\" duration=\"7330000\" />\n      <workItem from=\"1558868487137\" duration=\"6475000\" />\n      <workItem from=\"1558879898647\" duration=\"3028000\" />\n      <workItem from=\"1558931650256\" duration=\"1334000\" />\n    </task>\n    <servers />\n  </component>\n  <component name=\"TimeTrackingManager\">\n    <option name=\"totallyTimeSpent\" value=\"34494000\" />\n  </component>\n  <component name=\"ToolWindowManager\">\n    <frame x=\"64\" y=\"-4\" width=\"1299\" height=\"630\" extended-state=\"6\" />\n    <layout>\n      <window_info content_ui=\"combo\" id=\"Project\" order=\"0\" visible=\"true\" weight=\"0.25502816\" />\n      <window_info id=\"Structure\" order=\"1\" side_tool=\"true\" weight=\"0.25\" />\n      <window_info id=\"Favorites\" order=\"2\" side_tool=\"true\" />\n      <window_info anchor=\"bottom\" id=\"Message\" order=\"0\" />\n      <window_info anchor=\"bottom\" id=\"Find\" order=\"1\" />\n      <window_info anchor=\"bottom\" id=\"Run\" order=\"2\" />\n      <window_info anchor=\"bottom\" id=\"Debug\" order=\"3\" weight=\"0.4\" />\n      <window_info anchor=\"bottom\" id=\"Cvs\" order=\"4\" weight=\"0.25\" />\n      <window_info anchor=\"bottom\" id=\"Inspection\" order=\"5\" weight=\"0.4\" />\n      <window_info anchor=\"bottom\" id=\"TODO\" order=\"6\" />\n      <window_info anchor=\"bottom\" id=\"Version Control\" order=\"7\" show_stripe_button=\"false\" />\n      <window_info anchor=\"bottom\" id=\"Python Console\" order=\"8\" sideWeight=\"0.49711815\" weight=\"0.562323\" />\n      <window_info active=\"true\" anchor=\"bottom\" id=\"Terminal\" order=\"9\" sideWeight=\"0.49423632\" visible=\"true\" weight=\"0.268714\" />\n      <window_info anchor=\"bottom\" id=\"Docker\" order=\"10\" show_stripe_button=\"false\" />\n      <window_info anchor=\"bottom\" id=\"Database Changes\" order=\"11\" show_stripe_button=\"false\" />\n      <window_info anchor=\"bottom\" id=\"Event Log\" order=\"12\" sideWeight=\"0.5028818\" side_tool=\"true\" weight=\"0.562323\" />\n      <window_info anchor=\"right\" id=\"Commander\" order=\"0\" weight=\"0.4\" />\n      <window_info anchor=\"right\" id=\"Ant Build\" order=\"1\" weight=\"0.25\" />\n      <window_info anchor=\"right\" content_ui=\"combo\" id=\"Hierarchy\" order=\"2\" weight=\"0.25\" />\n      <window_info anchor=\"right\" id=\"SciView\" order=\"3\" />\n      <window_info anchor=\"right\" id=\"Database\" order=\"4\" />\n    </layout>\n  </component>\n  <component name=\"TypeScriptGeneratedFilesManager\">\n    <option name=\"version\" value=\"1\" />\n  </component>\n  <component name=\"Vcs.Log.UiProperties\">\n    <option name=\"RECENTLY_FILTERED_USER_GROUPS\">\n      <collection />\n    </option>\n    <option name=\"RECENTLY_FILTERED_BRANCH_GROUPS\">\n      <collection />\n    </option>\n  </component>\n  <component name=\"editorHistoryManager\">\n    <entry file=\"file://$PROJECT_DIR$/apps/order/views.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1431\">\n          <caret line=\"385\" column=\"60\" selection-start-line=\"385\" selection-start-column=\"18\" selection-end-line=\"385\" selection-end-column=\"60\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/order/models.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"666\">\n          <caret line=\"38\" column=\"16\" selection-start-line=\"38\" selection-start-column=\"8\" selection-end-line=\"38\" selection-end-column=\"16\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/order/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/dailyfresh/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/site-packages/django/apps/registry.py\" />\n    <entry file=\"file://$PROJECT_DIR$/templates/static_base.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/register.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"234\">\n          <caret line=\"19\" column=\"29\" lean-forward=\"true\" selection-start-line=\"19\" selection-start-column=\"29\" selection-end-line=\"19\" selection-end-column=\"29\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/site-packages/django/db/utils.py\" />\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/importlib/__init__.py\" />\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/site-packages/django/db/backends/mysql/base.py\" />\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/site-packages/celery/app/base.py\" />\n    <entry file=\"file://$PROJECT_DIR$/../../../python36-env/pytest/Lib/site-packages/celery/fixups/django.py\" />\n    <entry file=\"file://$PROJECT_DIR$/apps/user/models.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"234\">\n          <caret line=\"15\" column=\"37\" selection-start-line=\"15\" selection-start-column=\"37\" selection-end-line=\"15\" selection-end-column=\"37\" />\n          <folding>\n            <element signature=\"e#0#28#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/login.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"252\">\n          <caret line=\"14\" column=\"50\" selection-start-line=\"14\" selection-start-column=\"50\" selection-end-line=\"14\" selection-end-column=\"50\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/db/base_model.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"198\">\n          <caret line=\"11\" column=\"23\" selection-start-line=\"11\" selection-start-column=\"23\" selection-end-line=\"11\" selection-end-column=\"23\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/db/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/utils/fdfs/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/user/views.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1168\">\n          <caret line=\"398\" column=\"19\" selection-start-line=\"398\" selection-start-column=\"19\" selection-end-line=\"398\" selection-end-column=\"19\" />\n          <folding>\n            <element signature=\"e#0#44#0\" expanded=\"true\" />\n            <element signature=\"e#857#2172#0\" />\n            <element signature=\"e#2209#3221#0\" />\n            <element signature=\"e#4981#5557#0\" />\n            <element signature=\"e#5601#7347#0\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/user/admin.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/user/tests.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/utils/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/utils/mixin.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"144\">\n          <caret line=\"8\" column=\"35\" selection-start-line=\"8\" selection-start-column=\"35\" selection-end-line=\"8\" selection-end-column=\"35\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/static/index.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"54\">\n          <caret line=\"3\" column=\"52\" selection-start-line=\"3\" selection-start-column=\"52\" selection-end-line=\"3\" selection-end-column=\"52\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/goods/models.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"378\">\n          <caret line=\"21\" column=\"26\" selection-start-line=\"21\" selection-start-column=\"26\" selection-end-line=\"21\" selection-end-column=\"26\" />\n          <folding>\n            <element signature=\"e#0#28#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/static/test.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"126\">\n          <caret line=\"7\" column=\"26\" selection-start-line=\"7\" selection-start-column=\"26\" selection-end-line=\"7\" selection-end-column=\"26\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/static/place_order.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"162\">\n          <caret line=\"9\" column=\"28\" lean-forward=\"true\" selection-start-line=\"9\" selection-start-column=\"28\" selection-end-line=\"9\" selection-end-column=\"28\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/base.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"504\">\n          <caret line=\"28\" column=\"54\" selection-start-line=\"28\" selection-start-column=\"54\" selection-end-line=\"28\" selection-end-column=\"54\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/order_comment.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"90\">\n          <caret line=\"5\" column=\"44\" lean-forward=\"true\" selection-start-line=\"5\" selection-start-column=\"44\" selection-end-line=\"5\" selection-end-column=\"44\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/goods/views.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"630\">\n          <caret line=\"42\" column=\"38\" selection-start-line=\"42\" selection-start-column=\"38\" selection-end-line=\"42\" selection-end-column=\"38\" />\n          <folding>\n            <element signature=\"e#0#45#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/order/urls.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"54\">\n          <caret line=\"4\" column=\"17\" selection-start-line=\"4\" selection-start-column=\"17\" selection-end-line=\"4\" selection-end-column=\"17\" />\n          <folding>\n            <element signature=\"e#0#32#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/user/urls.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"324\">\n          <caret line=\"20\" column=\"38\" selection-start-line=\"20\" selection-start-column=\"38\" selection-end-line=\"20\" selection-end-column=\"38\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/goods/urls.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"162\">\n          <caret line=\"9\" selection-start-line=\"9\" selection-end-line=\"9\" />\n          <folding>\n            <element signature=\"e#0#32#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/search/indexes/goods/goodssku_text.txt\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/search/search.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"540\">\n          <caret line=\"30\" column=\"30\" selection-start-line=\"30\" selection-start-column=\"30\" selection-end-line=\"30\" selection-end-column=\"30\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/templates/index.html\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"558\">\n          <caret line=\"31\" column=\"40\" selection-start-line=\"31\" selection-start-column=\"40\" selection-end-line=\"31\" selection-end-column=\"40\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/dailyfresh/urls.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"78\">\n          <caret line=\"19\" column=\"46\" selection-start-line=\"19\" selection-start-column=\"46\" selection-end-line=\"19\" selection-end-column=\"46\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi2.pid\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"18\">\n          <caret line=\"1\" lean-forward=\"true\" selection-start-line=\"1\" selection-end-line=\"1\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi.pid\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\" />\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/dailyfresh/wsgi.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"234\">\n          <caret line=\"15\" column=\"36\" lean-forward=\"true\" selection-start-line=\"15\" selection-start-column=\"36\" selection-end-line=\"15\" selection-end-column=\"36\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/goods/search_indexes.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state>\n          <folding>\n            <element signature=\"e#8#36#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/celery_tasks/tasks.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"90\">\n          <caret line=\"5\" column=\"11\" selection-start-line=\"5\" selection-start-column=\"11\" selection-end-line=\"5\" selection-end-column=\"11\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/order/admin.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"54\">\n          <caret line=\"3\" lean-forward=\"true\" selection-start-line=\"3\" selection-end-line=\"3\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/apps/goods/admin.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"180\">\n          <caret line=\"10\" selection-start-line=\"10\" selection-end-line=\"10\" />\n          <folding>\n            <element signature=\"e#0#32#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/dailyfresh/settings.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"193\">\n          <caret line=\"153\" column=\"31\" lean-forward=\"true\" selection-start-line=\"153\" selection-start-column=\"31\" selection-end-line=\"153\" selection-end-column=\"31\" />\n          <folding>\n            <element signature=\"e#383#392#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/utils/fdfs/storage.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"144\">\n          <caret line=\"10\" column=\"51\" selection-start-line=\"10\" selection-start-column=\"51\" selection-end-line=\"10\" selection-end-column=\"51\" />\n          <folding>\n            <element signature=\"e#0#45#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/utils/fdfs/client.conf\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"252\">\n          <caret line=\"14\" selection-start-line=\"14\" selection-end-line=\"14\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/manage.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"162\">\n          <caret line=\"10\" selection-start-line=\"10\" selection-end-line=\"10\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi.ini\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"342\">\n          <caret line=\"19\" column=\"11\" selection-start-line=\"19\" selection-start-column=\"11\" selection-end-line=\"19\" selection-end-column=\"40\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi2.ini\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"342\">\n          <caret line=\"19\" column=\"40\" selection-start-line=\"19\" selection-start-column=\"40\" selection-end-line=\"19\" selection-end-column=\"40\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi2.log\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"-1555\" />\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/uwsgi.log\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"-781\">\n          <caret line=\"1140\" column=\"40\" selection-start-line=\"1140\" selection-start-column=\"40\" selection-end-line=\"1140\" selection-end-column=\"40\" />\n        </state>\n      </provider>\n    </entry>\n  </component>\n</project>"
  },
  {
    "path": "dailyfresh/apps/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/cart/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/cart/admin.py",
    "content": "from django.contrib import admin\n\n# Register your models here.\n"
  },
  {
    "path": "dailyfresh/apps/cart/migrations/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/cart/models.py",
    "content": "from django.db import models\n\n# Create your models here.\n"
  },
  {
    "path": "dailyfresh/apps/cart/tests.py",
    "content": "from django.test import TestCase\n\n# Create your tests here.\n"
  },
  {
    "path": "dailyfresh/apps/cart/urls.py",
    "content": "from django.conf.urls import url\nfrom cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView\n\nurlpatterns = [\n    url(r'^add$', CartAddView.as_view(), name='add'), # 购物车记录添加\n    url(r'^$', CartInfoView.as_view(), name='show'), # 购物车页面显示\n    url(r'^update$', CartUpdateView.as_view(), name='update'), # 购物车记录更新\n    url(r'^delete$', CartDeleteView.as_view(), name='delete'), # 购物车记录删除\n]\n"
  },
  {
    "path": "dailyfresh/apps/cart/views.py",
    "content": "from django.shortcuts import render\nfrom django.views.generic import View\nfrom django.http import JsonResponse\n\nfrom goods.models import GoodsSKU\nfrom django_redis import get_redis_connection\nfrom utils.mixin import LoginRequiredMixin\n\n# Create your views here.\n# 添加商品到购物车:\n# 1）请求方式，采用ajax post\n# 如果涉及到数据的修改(新增，更新，删除), 采用post\n# 如果只涉及到数据的获取，采用get\n# 2) 传递参数: 商品id(sku_id) 商品数量(count)\n\n\n# ajax发起的请求都在后台，在浏览器中看不到效果\n# /cart/add\nclass CartAddView(View):\n    '''购物车记录添加'''\n    def post(self, request):\n        '''购物车记录添加'''\n        user = request.user\n        if not user.is_authenticated():\n            # 用户未登录\n            return JsonResponse({'res':0, 'errmsg':'请先登录'})\n\n        # 接收数据\n        sku_id = request.POST.get('sku_id')\n        count = request.POST.get('count')\n\n        # 数据校验\n        if not all([sku_id, count]):\n            return JsonResponse({'res':1, 'errmsg':'数据不完整'})\n\n        # 校验添加的商品数量\n        try:\n            count = int(count)\n        except Exception as e:\n            # 数目出错\n            return JsonResponse({'res':2, 'errmsg':'商品数目出错'})\n\n        # 校验商品是否存在\n        try:\n            sku = GoodsSKU.objects.get(id=sku_id)\n        except GoodsSKU.DoesNotExist:\n            # 商品不存在\n            return JsonResponse({'res':3, 'errmsg':'商品不存在'})\n\n        # 业务处理:添加购物车记录\n        conn = get_redis_connection('default')\n        cart_key = 'cart_%d'%user.id\n        # 先尝试获取sku_id的值 -> hget cart_key 属性\n        # 如果sku_id在hash中不存在，hget返回None\n        cart_count = conn.hget(cart_key, sku_id)\n        if cart_count:\n            # 累加购物车中商品的数目\n            count += int(cart_count)\n\n        # 校验商品的库存\n        if count > sku.stock:\n            return JsonResponse({'res':4, 'errmsg':'商品库存不足'})\n\n        # 设置hash中sku_id对应的值\n        # hset->如果sku_id已经存在，更新数据， 如果sku_id不存在，添加数据\n        conn.hset(cart_key, sku_id, count)\n\n        # 计算用户购物车商品的条目数\n        total_count = conn.hlen(cart_key)\n\n        # 返回应答\n        return JsonResponse({'res':5, 'total_count':total_count, 'message':'添加成功'})\n\n\n# /cart/\nclass CartInfoView(LoginRequiredMixin, View):\n    '''购物车页面显示'''\n    def get(self, request):\n        '''显示'''\n        # 获取登录的用户\n        user = request.user\n        # 获取用户购物车中商品的信息\n        conn = get_redis_connection('default')\n        cart_key = 'cart_%d'%user.id\n        # {'商品id':商品数量, ...}\n        cart_dict = conn.hgetall(cart_key)\n\n        skus = []\n        # 保存用户购物车中商品的总数目和总价格\n        total_count = 0\n        total_price = 0\n        # 遍历获取商品的信息\n        for sku_id, count in cart_dict.items():\n            # 根据商品的id获取商品的信息\n            sku = GoodsSKU.objects.get(id=sku_id)\n            # 计算商品的小计\n            amount = sku.price*int(count)\n            # 动态给sku对象增加一个属性amount, 保存商品的小计\n            sku.amount = amount\n            # 动态给sku对象增加一个属性count, 保存购物车中对应商品的数量\n            sku.count = count\n            # 添加\n            skus.append(sku)\n\n            # 累加计算商品的总数目和总价格\n            total_count += int(count)\n            total_price += amount\n\n        # 组织上下文\n        context = {'total_count':total_count,\n                   'total_price':total_price,\n                   'skus':skus}\n\n        # 使用模板\n        return render(request, 'cart.html', context)\n\n\n# 更新购物车记录\n# 采用ajax post请求\n# 前端需要传递的参数:商品id(sku_id) 更新的商品数量(count)\n# /cart/update\nclass CartUpdateView(View):\n    '''购物车记录更新'''\n    def post(self, request):\n        '''购物车记录更新'''\n        user = request.user\n        if not user.is_authenticated():\n            # 用户未登录\n            return JsonResponse({'res': 0, 'errmsg': '请先登录'})\n\n        # 接收数据\n        sku_id = request.POST.get('sku_id')\n        count = request.POST.get('count')\n\n        # 数据校验\n        if not all([sku_id, count]):\n            return JsonResponse({'res': 1, 'errmsg': '数据不完整'})\n\n        # 校验添加的商品数量\n        try:\n            count = int(count)\n        except Exception as e:\n            # 数目出错\n            return JsonResponse({'res': 2, 'errmsg': '商品数目出错'})\n\n        # 校验商品是否存在\n        try:\n            sku = GoodsSKU.objects.get(id=sku_id)\n        except GoodsSKU.DoesNotExist:\n            # 商品不存在\n            return JsonResponse({'res': 3, 'errmsg': '商品不存在'})\n\n        # 业务处理:更新购物车记录\n        conn = get_redis_connection('default')\n        cart_key = 'cart_%d'%user.id\n\n        # 校验商品的库存\n        if count > sku.stock:\n            return JsonResponse({'res':4, 'errmsg':'商品库存不足'})\n\n        # 更新\n        conn.hset(cart_key, sku_id, count)\n\n        # 计算用户购物车中商品的总件数 {'1':5, '2':3}\n        total_count = 0\n        vals = conn.hvals(cart_key)\n        for val in vals:\n            total_count += int(val)\n\n        # 返回应答\n        return JsonResponse({'res':5, 'total_count':total_count, 'message':'更新成功'})\n\n\n# 删除购物车记录\n# 采用ajax post请求\n# 前端需要传递的参数:商品的id(sku_id)\n# /cart/delete\nclass CartDeleteView(View):\n    '''购物车记录删除'''\n    def post(self, request):\n        '''购物车记录删除'''\n        user = request.user\n        if not user.is_authenticated():\n            # 用户未登录\n            return JsonResponse({'res': 0, 'errmsg': '请先登录'})\n\n        # 接收参数\n        sku_id = request.POST.get('sku_id')\n\n        # 数据的校验\n        if not sku_id:\n            return JsonResponse({'res':1, 'errmsg':'无效的商品id'})\n\n        # 校验商品是否存在\n        try:\n            sku = GoodsSKU.objects.get(id=sku_id)\n        except GoodsSKU.DoesNotExist:\n            # 商品不存在\n            return JsonResponse({'res':2, 'errmsg':'商品不存在'})\n\n        # 业务处理:删除购物车记录\n        conn = get_redis_connection('default')\n        cart_key = 'cart_%d'%user.id\n\n        # 删除 hdel\n        conn.hdel(cart_key, sku_id)\n\n        # 计算用户购物车中商品的总件数 {'1':5, '2':3}\n        total_count = 0\n        vals = conn.hvals(cart_key)\n        for val in vals:\n            total_count += int(val)\n\n        # 返回应答\n        return JsonResponse({'res':3, 'total_count':total_count, 'message':'删除成功'})\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "dailyfresh/apps/goods/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/goods/admin.py",
    "content": "from django.contrib import admin\nfrom django.core.cache import cache\nfrom goods.models import GoodsType,IndexPromotionBanner,IndexGoodsBanner,IndexTypeGoodsBanner\n# Register your models here.\n\n\nclass BaseModelAdmin(admin.ModelAdmin):\n    def save_model(self, request, obj, form, change):\n        '''新增或更新表中的数据时调用'''\n        super().save_model(request, obj, form, change)\n\n        # 发出任务，让celery worker重新生成首页静态页\n        from celery_tasks.tasks import generate_static_index_html\n        generate_static_index_html.delay()\n\n        # 清除首页的缓存数据\n        cache.delete('index_page_data')\n\n    def delete_model(self, request, obj):\n        '''删除表中的数据时调用'''\n        super().delete_model(request, obj)\n        # 发出任务，让celery worker重新生成首页静态页\n        from celery_tasks.tasks import generate_static_index_html\n        generate_static_index_html.delay()\n\n        # 清除首页的缓存数据\n        cache.delete('index_page_data')\n\n\nclass GoodsTypeAdmin(BaseModelAdmin):\n    pass\n\n\nclass IndexGoodsBannerAdmin(BaseModelAdmin):\n    pass\n\n\nclass IndexTypeGoodsBannerAdmin(BaseModelAdmin):\n    pass\n\n\nclass IndexPromotionBannerAdmin(BaseModelAdmin):\n    pass\n\n\nadmin.site.register(GoodsType, GoodsTypeAdmin)\nadmin.site.register(IndexGoodsBanner, IndexGoodsBannerAdmin)\nadmin.site.register(IndexTypeGoodsBanner, IndexTypeGoodsBannerAdmin)\nadmin.site.register(IndexPromotionBanner, IndexPromotionBannerAdmin)\n"
  },
  {
    "path": "dailyfresh/apps/goods/migrations/0001_initial.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport tinymce.models\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n    ]\n\n    operations = [\n        migrations.CreateModel(\n            name='Goods',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('name', models.CharField(verbose_name='商品SPU名称', max_length=20)),\n                ('detail', tinymce.models.HTMLField(verbose_name='商品详情', blank=True)),\n            ],\n            options={\n                'verbose_name': '商品SPU',\n                'db_table': 'df_goods',\n                'verbose_name_plural': '商品SPU',\n            },\n        ),\n        migrations.CreateModel(\n            name='GoodsImage',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('image', models.ImageField(verbose_name='图片路径', upload_to='goods')),\n            ],\n            options={\n                'verbose_name': '商品图片',\n                'db_table': 'df_goods_image',\n                'verbose_name_plural': '商品图片',\n            },\n        ),\n        migrations.CreateModel(\n            name='GoodsSKU',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('name', models.CharField(verbose_name='商品名称', max_length=20)),\n                ('desc', models.CharField(verbose_name='商品简介', max_length=256)),\n                ('price', models.DecimalField(verbose_name='商品价格', max_digits=10, decimal_places=2)),\n                ('unite', models.CharField(verbose_name='商品单位', max_length=20)),\n                ('image', models.ImageField(verbose_name='商品图片', upload_to='goods')),\n                ('stock', models.IntegerField(verbose_name='商品库存', default=1)),\n                ('sales', models.IntegerField(verbose_name='商品销量', default=0)),\n                ('status', models.SmallIntegerField(verbose_name='商品状态', default=1, choices=[(0, '下线'), (1, '上线')])),\n                ('goods', models.ForeignKey(verbose_name='商品SPU', to='goods.Goods')),\n            ],\n            options={\n                'verbose_name': '商品',\n                'db_table': 'df_goods_sku',\n                'verbose_name_plural': '商品',\n            },\n        ),\n        migrations.CreateModel(\n            name='GoodsType',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('name', models.CharField(verbose_name='种类名称', max_length=20)),\n                ('logo', models.CharField(verbose_name='标识', max_length=20)),\n                ('image', models.ImageField(verbose_name='商品类型图片', upload_to='type')),\n            ],\n            options={\n                'verbose_name': '商品种类',\n                'db_table': 'df_goods_type',\n                'verbose_name_plural': '商品种类',\n            },\n        ),\n        migrations.CreateModel(\n            name='IndexGoodsBanner',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('image', models.ImageField(verbose_name='图片', upload_to='banner')),\n                ('index', models.SmallIntegerField(verbose_name='展示顺序', default=0)),\n                ('sku', models.ForeignKey(verbose_name='商品', to='goods.GoodsSKU')),\n            ],\n            options={\n                'verbose_name': '首页轮播商品',\n                'db_table': 'df_index_banner',\n                'verbose_name_plural': '首页轮播商品',\n            },\n        ),\n        migrations.CreateModel(\n            name='IndexPromotionBanner',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('name', models.CharField(verbose_name='活动名称', max_length=20)),\n                ('url', models.URLField(verbose_name='活动链接')),\n                ('image', models.ImageField(verbose_name='活动图片', upload_to='banner')),\n                ('index', models.SmallIntegerField(verbose_name='展示顺序', default=0)),\n            ],\n            options={\n                'verbose_name': '主页促销活动',\n                'db_table': 'df_index_promotion',\n                'verbose_name_plural': '主页促销活动',\n            },\n        ),\n        migrations.CreateModel(\n            name='IndexTypeGoodsBanner',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('display_type', models.SmallIntegerField(verbose_name='展示类型', default=1, choices=[(0, '标题'), (1, '图片')])),\n                ('index', models.SmallIntegerField(verbose_name='展示顺序', default=0)),\n                ('sku', models.ForeignKey(verbose_name='商品SKU', to='goods.GoodsSKU')),\n                ('type', models.ForeignKey(verbose_name='商品类型', to='goods.GoodsType')),\n            ],\n            options={\n                'verbose_name': '主页分类展示商品',\n                'db_table': 'df_index_type_goods',\n                'verbose_name_plural': '主页分类展示商品',\n            },\n        ),\n        migrations.AddField(\n            model_name='goodssku',\n            name='type',\n            field=models.ForeignKey(verbose_name='商品种类', to='goods.GoodsType'),\n        ),\n        migrations.AddField(\n            model_name='goodsimage',\n            name='sku',\n            field=models.ForeignKey(verbose_name='商品', to='goods.GoodsSKU'),\n        ),\n    ]\n"
  },
  {
    "path": "dailyfresh/apps/goods/migrations/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/goods/models.py",
    "content": "from django.db import models\nfrom db.base_model import BaseModel\nfrom tinymce.models import HTMLField\n# Create your models here.\n\n\nclass GoodsType(BaseModel):\n    '''商品类型模型类'''\n    name = models.CharField(max_length=20, verbose_name='种类名称')\n    logo = models.CharField(max_length=20, verbose_name='标识')\n    image = models.ImageField(upload_to='type', verbose_name='商品类型图片')\n\n    class Meta:\n        db_table = 'df_goods_type'\n        verbose_name = '商品种类'\n        verbose_name_plural = verbose_name\n\n    def __str__(self):\n        return self.name\n\n\nclass GoodsSKU(BaseModel):\n    '''商品SKU模型类'''\n    status_choices = (\n        (0, '下线'),\n        (1, '上线'),\n    )\n\n    type = models.ForeignKey('GoodsType', verbose_name='商品种类')\n    goods = models.ForeignKey('Goods', verbose_name='商品SPU')\n    name = models.CharField(max_length=20, verbose_name='商品名称')\n    desc = models.CharField(max_length=256, verbose_name='商品简介')\n    price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name='商品价格')\n    unite = models.CharField(max_length=20, verbose_name='商品单位')\n    image = models.ImageField(upload_to='goods', verbose_name='商品图片')\n    stock = models.IntegerField(default=1, verbose_name='商品库存')\n    sales = models.IntegerField(default=0, verbose_name='商品销量')\n    status = models.SmallIntegerField(default=1, choices=status_choices, verbose_name='商品状态')\n\n    class Meta:\n        db_table = 'df_goods_sku'\n        verbose_name = '商品'\n        verbose_name_plural = verbose_name\n\n\nclass Goods(BaseModel):\n    '''商品SPU模型类'''\n    name = models.CharField(max_length=20, verbose_name='商品SPU名称')\n    # 富文本类型:带有格式的文本\n    detail = HTMLField(blank=True, verbose_name='商品详情')\n\n    class Meta:\n        db_table = 'df_goods'\n        verbose_name = '商品SPU'\n        verbose_name_plural = verbose_name\n\n\nclass GoodsImage(BaseModel):\n    '''商品图片模型类'''\n    sku = models.ForeignKey('GoodsSKU', verbose_name='商品')\n    image = models.ImageField(upload_to='goods', verbose_name='图片路径')\n\n    class Meta:\n        db_table = 'df_goods_image'\n        verbose_name = '商品图片'\n        verbose_name_plural = verbose_name\n\n\nclass IndexGoodsBanner(BaseModel):\n    '''首页轮播商品展示模型类'''\n    sku = models.ForeignKey('GoodsSKU', verbose_name='商品')\n    image = models.ImageField(upload_to='banner', verbose_name='图片')\n    index = models.SmallIntegerField(default=0, verbose_name='展示顺序') # 0 1 2 3\n\n    class Meta:\n        db_table = 'df_index_banner'\n        verbose_name = '首页轮播商品'\n        verbose_name_plural = verbose_name\n\n\nclass IndexTypeGoodsBanner(BaseModel):\n    '''首页分类商品展示模型类'''\n    DISPLAY_TYPE_CHOICES = (\n        (0, \"标题\"),\n        (1, \"图片\")\n    )\n\n    type = models.ForeignKey('GoodsType', verbose_name='商品类型')\n    sku = models.ForeignKey('GoodsSKU', verbose_name='商品SKU')\n    display_type = models.SmallIntegerField(default=1, choices=DISPLAY_TYPE_CHOICES, verbose_name='展示类型')\n    index = models.SmallIntegerField(default=0, verbose_name='展示顺序')\n\n    class Meta:\n        db_table = 'df_index_type_goods'\n        verbose_name = \"主页分类展示商品\"\n        verbose_name_plural = verbose_name\n\n\nclass IndexPromotionBanner(BaseModel):\n    '''首页促销活动模型类'''\n    name = models.CharField(max_length=20, verbose_name='活动名称')\n    url = models.CharField(max_length=256, verbose_name='活动链接')\n    image = models.ImageField(upload_to='banner', verbose_name='活动图片')\n    index = models.SmallIntegerField(default=0, verbose_name='展示顺序')\n\n    class Meta:\n        db_table = 'df_index_promotion'\n        verbose_name = \"主页促销活动\"\n        verbose_name_plural = verbose_name"
  },
  {
    "path": "dailyfresh/apps/goods/search_indexes.py",
    "content": "# 定义索引类\nfrom haystack import indexes\n# 导入你的模型类\nfrom goods.models import GoodsSKU\n\n\n# 指定对于某个类的某些数据建立索引\n# 索引类名格式:模型类名+Index\nclass GoodsSKUIndex(indexes.SearchIndex, indexes.Indexable):\n    # 索引字段 use_template=True指定根据表中的哪些字段建立索引文件的说明放在一个文件中\n    text = indexes.CharField(document=True, use_template=True)\n\n    def get_model(self):\n        # 返回你的模型类\n        return GoodsSKU\n\n    # 建立索引的数据\n    def index_queryset(self, using=None):\n        return self.get_model().objects.all()\n"
  },
  {
    "path": "dailyfresh/apps/goods/tests.py",
    "content": "from django.test import TestCase\n\n# Create your tests here.\n"
  },
  {
    "path": "dailyfresh/apps/goods/urls.py",
    "content": "from django.conf.urls import url\nfrom goods.views import IndexView, DetailView, ListView\n\nurlpatterns = [\n    url(r'^index$', IndexView.as_view(), name='index'), # 首页\n    url(r'^goods/(?P<goods_id>\\d+)$', DetailView.as_view(), name='detail'), # 详情页\n    url(r'^list/(?P<type_id>\\d+)/(?P<page>\\d+)$', ListView.as_view(), name='list'), # 列表页\n\n]\n"
  },
  {
    "path": "dailyfresh/apps/goods/views.py",
    "content": "from django.shortcuts import render, redirect\nfrom django.core.urlresolvers import reverse\nfrom django.views.generic import View\nfrom django.core.cache import cache\nfrom django.core.paginator import Paginator\nfrom goods.models import GoodsType, GoodsSKU, IndexGoodsBanner,IndexPromotionBanner,IndexTypeGoodsBanner\nfrom django_redis import get_redis_connection\nfrom order.models import OrderGoods\n# Create your views here.\n\n# class Test(object):\n#     def __init__(self):\n#         self.name = 'abc'\n#\n# t = Test()\n# t.age = 10\n# print(t.age)\n\n\n# http://127.0.0.1:8000\nclass IndexView(View):\n    '''首页'''\n    def get(self, request):\n        '''显示首页'''\n        # 尝试从缓存中获取数据\n        context = cache.get('index_page_data')\n\n        if context is None:\n            print('设置缓存')\n            # 缓存中没有数据\n            # 获取商品的种类信息\n            types = GoodsType.objects.all()\n\n            # 获取首页轮播商品信息\n            goods_banners = IndexGoodsBanner.objects.all().order_by('index')\n\n            # 获取首页促销活动信息\n            promotion_banners = IndexPromotionBanner.objects.all().order_by('index')\n\n            # 获取首页分类商品展示信息\n            for type in types: # GoodsType\n                # 获取type种类首页分类商品的图片展示信息\n                image_banners = IndexTypeGoodsBanner.objects.filter(type=type, display_type=1).order_by('index')\n                # 获取type种类首页分类商品的文字展示信息\n                title_banners = IndexTypeGoodsBanner.objects.filter(type=type, display_type=0).order_by('index')\n\n                # 动态给type增加属性，分别保存首页分类商品的图片展示信息和文字展示信息\n                type.image_banners = image_banners\n                type.title_banners = title_banners\n\n            context = {'types': types,\n                       'goods_banners': goods_banners,\n                       'promotion_banners': promotion_banners}\n            # 设置缓存\n            # key  value timeout\n            cache.set('index_page_data', context, 3600)\n\n        # 获取用户购物车中商品的数目\n        user = request.user\n        cart_count = 0\n        if user.is_authenticated():\n            # 用户已登录\n            conn = get_redis_connection('default')\n            cart_key = 'cart_%d'%user.id\n            cart_count = conn.hlen(cart_key)\n\n        # 组织模板上下文\n        context.update(cart_count=cart_count)\n\n        # 使用模板\n        return render(request, 'index.html', context)\n\n\n# /goods/商品id\nclass DetailView(View):\n    '''详情页'''\n    def get(self, request, goods_id):\n        '''显示详情页'''\n        try:\n            sku = GoodsSKU.objects.get(id=goods_id)\n        except GoodsSKU.DoesNotExist:\n            # 商品不存在\n            return redirect(reverse('goods:index'))\n\n        # 获取商品的分类信息\n        types = GoodsType.objects.all()\n\n        # 获取商品的评论信息\n        sku_orders = OrderGoods.objects.filter(sku=sku).exclude(comment='')\n\n        # 获取新品信息\n        new_skus = GoodsSKU.objects.filter(type=sku.type).order_by('-create_time')[:2]\n\n        # 获取同一个SPU的其他规格商品\n        same_spu_skus = GoodsSKU.objects.filter(goods=sku.goods).exclude(id=goods_id)\n\n        # 获取用户购物车中商品的数目\n        user = request.user\n        cart_count = 0\n        if user.is_authenticated():\n            # 用户已登录\n            conn = get_redis_connection('default')\n            cart_key = 'cart_%d' % user.id\n            cart_count = conn.hlen(cart_key)\n\n            # 添加用户的历史记录\n            conn = get_redis_connection('default')\n            history_key = 'history_%d'%user.id\n            # 移除列表中的goods_id\n            conn.lrem(history_key, 0, goods_id)\n            # 把goods_id插入到列表的左侧\n            conn.lpush(history_key, goods_id)\n            # 只保存用户最新浏览的5条信息\n            conn.ltrim(history_key, 0, 4)\n\n        # 组织模板上下文\n        context = {'sku':sku, 'types':types,\n                   'sku_orders':sku_orders,\n                   'new_skus':new_skus,\n                   'same_spu_skus':same_spu_skus,\n                   'cart_count':cart_count}\n\n        # 使用模板\n        return render(request, 'detail.html', context)\n\n\n# 种类id 页码 排序方式\n# restful api -> 请求一种资源\n# /list?type_id=种类id&page=页码&sort=排序方式\n# /list/种类id/页码/排序方式\n# /list/种类id/页码?sort=排序方式\nclass ListView(View):\n    '''列表页'''\n    def get(self, request, type_id, page):\n        '''显示列表页'''\n        # 获取种类信息\n        try:\n            type = GoodsType.objects.get(id=type_id)\n        except GoodsType.DoesNotExist:\n            # 种类不存在\n            return redirect(reverse('goods:index'))\n\n        # 获取商品的分类信息\n        types = GoodsType.objects.all()\n\n        # 获取排序的方式 # 获取分类商品的信息\n        # sort=default 按照默认id排序\n        # sort=price 按照商品价格排序\n        # sort=hot 按照商品销量排序\n        sort = request.GET.get('sort')\n\n        if sort == 'price':\n            skus = GoodsSKU.objects.filter(type=type).order_by('price')\n        elif sort == 'hot':\n            skus = GoodsSKU.objects.filter(type=type).order_by('-sales')\n        else:\n            sort = 'default'\n            skus = GoodsSKU.objects.filter(type=type).order_by('-id')\n\n        # 对数据进行分页\n        paginator = Paginator(skus, 1)\n\n        # 获取第page页的内容\n        try:\n            page = int(page)\n        except Exception as e:\n            page = 1\n\n        if page > paginator.num_pages:\n            page = 1\n\n        # 获取第page页的Page实例对象\n        skus_page = paginator.page(page)\n\n        # todo: 进行页码的控制，页面上最多显示5个页码\n        # 1.总页数小于5页，页面上显示所有页码\n        # 2.如果当前页是前3页，显示1-5页\n        # 3.如果当前页是后3页，显示后5页\n        # 4.其他情况，显示当前页的前2页，当前页，当前页的后2页\n        num_pages = paginator.num_pages\n        if num_pages < 5:\n            pages = range(1, num_pages+1)\n        elif page <= 3:\n            pages = range(1, 6)\n        elif num_pages - page <= 2:\n            pages = range(num_pages-4, num_pages+1)\n        else:\n            pages = range(page-2, page+3)\n\n        # 获取新品信息\n        new_skus = GoodsSKU.objects.filter(type=type).order_by('-create_time')[:2]\n\n        # 获取用户购物车中商品的数目\n        user = request.user\n        cart_count = 0\n        if user.is_authenticated():\n            # 用户已登录\n            conn = get_redis_connection('default')\n            cart_key = 'cart_%d' % user.id\n            cart_count = conn.hlen(cart_key)\n\n        # 组织模板上下文\n        context = {'type':type, 'types':types,\n                   'skus_page':skus_page,\n                   'new_skus':new_skus,\n                   'cart_count':cart_count,\n                   'pages':pages,\n                   'sort':sort}\n\n        # 使用模板\n        return render(request, 'list.html', context)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "dailyfresh/apps/order/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/order/admin.py",
    "content": "from django.contrib import admin\n\n# Register your models here.\n"
  },
  {
    "path": "dailyfresh/apps/order/alipay_public_key.pem",
    "content": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslvKn/bhdwTG4xLX7sDfyZ7Nj/jmmD9NMdupMpu+m+2ulGiXcFCbqC2s9VnxAoecNPEawQkR51Pv7Y76V0PD5LXTsnsKK5GHh9ufhHklaAXwHAazur4b5gfsKCIeqBQtjVt5/SpYY7ClazZEM+YK1U4FNM/FuGEnHNtqFOujOrZNQCz1dkVZGpyj8jJiEFt+MkiDYs8iT45vKPH6nY2H+KZVu8DU7JwjSwO5VQD5Ac0TJLRgtJJpaJlW2iKrVww0K/EpTEdRLLP+UkldvuSaX7JME+YL9uCjimmpnK1TFtQ++IGP4s+pWt2BhCqbtFO0YsESnSpzeoLdE6jr743sGwIDAQAB\n-----END PUBLIC KEY-----"
  },
  {
    "path": "dailyfresh/apps/order/app_private_key.pem",
    "content": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAxPty8S0j29pQ4ZaqpQqzAm4gX+qhQKabY6thC4jHIWf/v26q\nDEOIApqc0iSrWJNAtF7pu+jgOIEWM80yuc6qhIvgtRyJ/O7g7ivM8RTws8UVOeJz\nv7eRJsXJIGuzk65uL25SKwRfWo1vtps67Fcdc4OGzMCdMW4kyJ3LOa9juP4Fwu3A\nGtAXSz3U6yJNyyyTu720DGZAacWKAHqPBDotTey8zBJx00TTu2a9Il4S5Y8OCfDl\n+Pos+UaMPYIaY62Tm+YEJccnT0I+42d3gwhEQvkGjijToyALmiSncgrEVIw8Dzzm\n90KjlU/rTvbET3S0NB7R/BGzOjc/aYDiB5z63QIDAQABAoIBAEGmVA6RLsxNHHuy\nzTioMjTzIxMUjZ2QaWV0bql7cnJtyMyyQzZHI4NKqE1ZL0ob+Yqjv16DJIdwbkfh\ncbB/clEulTuHQW3s50Y5jtoiUn53hrV+BXm14kh7zqZhfr4PemWQbQ4tLOJvFPZV\nEfRGrGgdQ8Xlw/3/aX77KAoXrDKwz8JQs7VhWP7aSr0t9Uf2NQeziuGomGN2jhIa\ns1GfCWoOmhGTnvDONcS6LDpx+BwhCPGbXNCDcXeK1NV0/EJm8hGTL/xTA2nHdvHK\nFeTqxDu2Dk+7h6U62pTmkvaEsqSDiVaJSqQSgSxRij36BKpBGEcIec6T6ygJh+RI\nXFpNIMECgYEA/h2m9qhvtJ1/Ij8lfCnzNeTw/StmSXQr2z+yoOk2OKkJpZybMO8V\nF2YOneoVk5ShyYSfuJSq6S9sKDMv4BHtNFHi4x0CssdBzx3IUBSQfzT8hLC8YIzF\noSfbiTi5omlQSi3nF3NmoVgxPe/vk0KWqCfRJHXgzE3c36bHIbaslhkCgYEAxnFZ\nYBoDw+7xYeBqxosICO/B+LX32oBQRUiu7NwAbWZSmSoB+MIW86SxZdcwHLLHp9VF\nYaq5PfyrexRbKYTuwbBLWyyA2q2dRbo3nlYa1fk21BNFB2neLiiqxnKcY2An+Ytq\nkMtRXRYzBHvhiaeCzuOH00aBPNvXqt44EVgeO2UCgYEAjxTZHwdGJneLzxepHpls\nRQtMmfBm3rMXwpLCHJJTomGjeemNBGeKA6vGTSoxzfAhjJstZ7vl4/h8uMHhkhPl\n8NCupNx/2XQSXPFTCawalFWcXYY5+08oNA6CMWiMNaOAvtPLy8uBnRVQXKSNy+fx\ndms8+n+Y/NBWrmN0uknmMXkCgYEAsTnWGk/hgQFLLqCge8T7Xg/Sam8JdmkWR2pM\nX1l0QEAcEJJFxIaCvQIfNNbkLx0z1p5QIpO4cLXR6FAbwo7oNK9f/YNXaPWY+gb/\nWTeJLAQwhWLYSXCxbwP+0NDW/qGH0gRDHiGW/s2urph8qtWhq2fljDjxfwrQJ9fi\ntwq9pUkCgYEA/ITjFfe4lIivKmdX5fSo00DloLM3SW5nILERxiIGyfv3lJVlCVJ6\nD6RGQF/shktSHv2HcFGGGamgUi4gWREk8Sb8uoUl4VPcMlQICjT8Dbry384f4jxW\nifjIEydKtFKpF8R1lOgCtzfwSeaegy3ETaYS7chqug9+QR36czV3q4E=\n-----END RSA PRIVATE KEY-----\n"
  },
  {
    "path": "dailyfresh/apps/order/migrations/0001_initial.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n    ]\n\n    operations = [\n        migrations.CreateModel(\n            name='OrderGoods',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('count', models.IntegerField(verbose_name='商品数目', default=1)),\n                ('price', models.DecimalField(verbose_name='商品价格', max_digits=10, decimal_places=2)),\n                ('comment', models.CharField(verbose_name='评论', max_length=256)),\n            ],\n            options={\n                'verbose_name': '订单商品',\n                'db_table': 'df_order_goods',\n                'verbose_name_plural': '订单商品',\n            },\n        ),\n        migrations.CreateModel(\n            name='OrderInfo',\n            fields=[\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('order_id', models.CharField(verbose_name='订单id', max_length=128, serialize=False, primary_key=True)),\n                ('pay_method', models.SmallIntegerField(verbose_name='支付方式', default=3, choices=[(1, '货到付款'), (2, '微信支付'), (3, '支付宝'), (4, '银联支付')])),\n                ('total_count', models.IntegerField(verbose_name='商品数量', default=1)),\n                ('total_price', models.DecimalField(verbose_name='商品总价', max_digits=10, decimal_places=2)),\n                ('transit_price', models.DecimalField(verbose_name='订单运费', max_digits=10, decimal_places=2)),\n                ('order_status', models.SmallIntegerField(verbose_name='订单状态', default=1, choices=[(1, '待支付'), (2, '待发货'), (3, '待收货'), (4, '待评价'), (5, '已完成')])),\n                ('trade_no', models.CharField(verbose_name='支付编号', max_length=128)),\n            ],\n            options={\n                'verbose_name': '订单',\n                'db_table': 'df_order_info',\n                'verbose_name_plural': '订单',\n            },\n        ),\n    ]\n"
  },
  {
    "path": "dailyfresh/apps/order/migrations/0002_auto_20171113_1813.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n        ('goods', '0001_initial'),\n        migrations.swappable_dependency(settings.AUTH_USER_MODEL),\n        ('user', '0001_initial'),\n        ('order', '0001_initial'),\n    ]\n\n    operations = [\n        migrations.AddField(\n            model_name='orderinfo',\n            name='addr',\n            field=models.ForeignKey(verbose_name='地址', to='user.Address'),\n        ),\n        migrations.AddField(\n            model_name='orderinfo',\n            name='user',\n            field=models.ForeignKey(verbose_name='用户', to=settings.AUTH_USER_MODEL),\n        ),\n        migrations.AddField(\n            model_name='ordergoods',\n            name='order',\n            field=models.ForeignKey(verbose_name='订单', to='order.OrderInfo'),\n        ),\n        migrations.AddField(\n            model_name='ordergoods',\n            name='sku',\n            field=models.ForeignKey(verbose_name='商品SKU', to='goods.GoodsSKU'),\n        ),\n    ]\n"
  },
  {
    "path": "dailyfresh/apps/order/migrations/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/order/models.py",
    "content": "from django.db import models\nfrom db.base_model import BaseModel\n# Create your models here.\n\n\nclass OrderInfo(BaseModel):\n    '''订单模型类'''\n    PAY_METHODS = {\n        '1': \"货到付款\",\n        '2': \"微信支付\",\n        '3': \"支付宝\",\n        '4': '银联支付'\n    }\n\n    PAY_METHODS_ENUM = {\n        \"CASH\": 1,\n        \"ALIPAY\": 2\n    }\n\n    ORDER_STATUS_ENUM = {\n        \"UNPAID\": 1,\n        \"UNSEND\": 2,\n        \"UNRECEIVED\": 3,\n        \"UNCOMMENT\": 4,\n        \"FINISHED\": 5\n    }\n\n    PAY_METHOD_CHOICES = (\n        (1, '货到付款'),\n        (2, '微信支付'),\n        (3, '支付宝'),\n        (4, '银联支付')\n    )\n\n    ORDER_STATUS = {\n        1:'待支付',\n        2:'待发货',\n        3:'待收货',\n        4:'待评价',\n        5:'已完成'\n    }\n\n    ORDER_STATUS_CHOICES = (\n        (1, '待支付'),\n        (2, '待发货'),\n        (3, '待收货'),\n        (4, '待评价'),\n        (5, '已完成')\n    )\n\n    order_id = models.CharField(max_length=128, primary_key=True, verbose_name='订单id')\n    user = models.ForeignKey('user.User', verbose_name='用户')\n    addr = models.ForeignKey('user.Address', verbose_name='地址')\n    pay_method = models.SmallIntegerField(choices=PAY_METHOD_CHOICES, default=3, verbose_name='支付方式')\n    total_count = models.IntegerField(default=1, verbose_name='商品数量')\n    total_price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name='商品总价')\n    transit_price = models.DecimalField(max_digits=10, decimal_places=2,verbose_name='订单运费')\n    order_status = models.SmallIntegerField(choices=ORDER_STATUS_CHOICES, default=1, verbose_name='订单状态')\n    trade_no = models.CharField(max_length=128, default='', verbose_name='支付编号')\n\n    class Meta:\n        db_table = 'df_order_info'\n        verbose_name = '订单'\n        verbose_name_plural = verbose_name\n\n\nclass OrderGoods(BaseModel):\n    '''订单商品模型类'''\n    order = models.ForeignKey('OrderInfo', verbose_name='订单')\n    sku = models.ForeignKey('goods.GoodsSKU', verbose_name='商品SKU')\n    count = models.IntegerField(default=1, verbose_name='商品数目')\n    price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name='商品价格')\n    comment = models.CharField(max_length=256, default='', verbose_name='评论')\n\n    class Meta:\n        db_table = 'df_order_goods'\n        verbose_name = '订单商品'\n        verbose_name_plural = verbose_name"
  },
  {
    "path": "dailyfresh/apps/order/tests.py",
    "content": "from django.test import TestCase\n\n# Create your tests here.\n"
  },
  {
    "path": "dailyfresh/apps/order/urls.py",
    "content": "from django.conf.urls import url\nfrom order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView,CommentView\n\nurlpatterns = [\n    url(r'^place$', OrderPlaceView.as_view(), name='place'), # 提交订单页面显示\n    url(r'^commit$', OrderCommitView.as_view(), name='commit'), # 订单创建\n    url(r'^pay$', OrderPayView.as_view(), name='pay'), # 订单支付\n    url(r'^check$', CheckPayView.as_view(), name='check'), # 查询支付交易结果\n    url(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'),  # 订单评论\n]\n"
  },
  {
    "path": "dailyfresh/apps/order/views.py",
    "content": "from django.shortcuts import render, redirect\nfrom django.core.urlresolvers import reverse\nfrom django.http import JsonResponse\nfrom django.db import transaction\nfrom django.conf import settings\nfrom django.views.generic import View\n\nfrom user.models import Address\nfrom goods.models import GoodsSKU\nfrom order.models import OrderInfo, OrderGoods\n\nfrom django_redis import get_redis_connection\nfrom utils.mixin import LoginRequiredMixin\nfrom datetime import datetime\nfrom alipay import AliPay\nimport os\n# Create your views here.\n\n\n# /order/place\nclass OrderPlaceView(LoginRequiredMixin, View):\n    '''提交订单页面显示'''\n    def post(self, request):\n        '''提交订单页面显示'''\n        # 获取登录的用户\n        user = request.user\n        # 获取参数sku_ids\n        sku_ids = request.POST.getlist('sku_ids') # [1,26]\n\n        # 校验参数\n        if not sku_ids:\n            # 跳转到购物车页面\n            return redirect(reverse('cart:show'))\n\n        conn = get_redis_connection('default')\n        cart_key = 'cart_%d'%user.id\n\n        skus = []\n        # 保存商品的总件数和总价格\n        total_count = 0\n        total_price = 0\n        # 遍历sku_ids获取用户要购买的商品的信息\n        for sku_id in sku_ids:\n            # 根据商品的id获取商品的信息\n            sku = GoodsSKU.objects.get(id=sku_id)\n            # 获取用户所要购买的商品的数量\n            count = conn.hget(cart_key, sku_id)\n            # 计算商品的小计\n            amount = sku.price*int(count)\n            # 动态给sku增加属性count,保存购买商品的数量\n            sku.count = count\n            # 动态给sku增加属性amount,保存购买商品的小计\n            sku.amount = amount\n            # 追加\n            skus.append(sku)\n            # 累加计算商品的总件数和总价格\n            total_count += int(count)\n            total_price += amount\n\n        # 运费:实际开发的时候，属于一个子系统\n        transit_price = 10 # 写死\n\n        # 实付款\n        total_pay = total_price + transit_price\n\n        # 获取用户的收件地址\n        addrs = Address.objects.filter(user=user)\n\n        # 组织上下文\n        sku_ids = ','.join(sku_ids) # [1,25]->1,25\n        context = {'skus':skus,\n                   'total_count':total_count,\n                   'total_price':total_price,\n                   'transit_price':transit_price,\n                   'total_pay':total_pay,\n                   'addrs':addrs,\n                   'sku_ids':sku_ids}\n\n        # 使用模板\n        return render(request, 'place_order.html', context)\n\n\n# 前端传递的参数:地址id(addr_id) 支付方式(pay_method) 用户要购买的商品id字符串(sku_ids)\n# mysql事务: 一组sql操作，要么都成功，要么都失败\n# 高并发:秒杀\n# 支付宝支付\nclass OrderCommitView1(View):\n    '''订单创建'''\n    @transaction.atomic\n    def post(self, request):\n        '''订单创建'''\n        # 判断用户是否登录\n        user = request.user\n        if not user.is_authenticated():\n            # 用户未登录\n            return JsonResponse({'res':0, 'errmsg':'用户未登录'})\n\n        # 接收参数\n        addr_id = request.POST.get('addr_id')\n        pay_method = request.POST.get('pay_method')\n        sku_ids = request.POST.get('sku_ids') # 1,3\n\n        # 校验参数\n        if not all([addr_id, pay_method, sku_ids]):\n            return JsonResponse({'res':1, 'errmsg':'参数不完整'})\n\n        # 校验支付方式\n        if pay_method not in OrderInfo.PAY_METHODS.keys():\n            return JsonResponse({'res':2, 'errmsg':'非法的支付方式'})\n\n        # 校验地址\n        try:\n            addr = Address.objects.get(id=addr_id)\n        except Address.DoesNotExist:\n            # 地址不存在\n            return JsonResponse({'res':3, 'errmsg':'地址非法'})\n\n        # todo: 创建订单核心业务\n\n        # 组织参数\n        # 订单id: 20171122181630+用户id\n        order_id = datetime.now().strftime('%Y%m%d%H%M%S')+str(user.id)\n\n        # 运费\n        transit_price = 10\n\n        # 总数目和总金额\n        total_count = 0\n        total_price = 0\n\n        # 设置事务保存点\n        save_id = transaction.savepoint()\n        try:\n            # todo: 向df_order_info表中添加一条记录\n            order = OrderInfo.objects.create(order_id=order_id,\n                                             user=user,\n                                             addr=addr,\n                                             pay_method=pay_method,\n                                             total_count=total_count,\n                                             total_price=total_price,\n                                             transit_price=transit_price)\n\n            # todo: 用户的订单中有几个商品，需要向df_order_goods表中加入几条记录\n            conn = get_redis_connection('default')\n            cart_key = 'cart_%d'%user.id\n\n            sku_ids = sku_ids.split(',')\n            for sku_id in sku_ids:\n                # 获取商品的信息\n                try:\n                    # select * from df_goods_sku where id=sku_id for update;\n                    sku = GoodsSKU.objects.select_for_update().get(id=sku_id)\n                except:\n                    # 商品不存在\n                    transaction.savepoint_rollback(save_id)\n                    return JsonResponse({'res':4, 'errmsg':'商品不存在'})\n\n                print('user:%d stock:%d'%(user.id, sku.stock))\n                import time\n                time.sleep(10)\n\n                # 从redis中获取用户所要购买的商品的数量\n                count = conn.hget(cart_key, sku_id)\n\n                # todo: 判断商品的库存\n                if int(count) > sku.stock:\n                    transaction.savepoint_rollback(save_id)\n                    return JsonResponse({'res':6, 'errmsg':'商品库存不足'})\n\n                # todo: 向df_order_goods表中添加一条记录\n                OrderGoods.objects.create(order=order,\n                                          sku=sku,\n                                          count=count,\n                                          price=sku.price)\n\n                # todo: 更新商品的库存和销量\n                sku.stock -= int(count)\n                sku.sales += int(count)\n                sku.save()\n\n                # todo: 累加计算订单商品的总数量和总价格\n                amount = sku.price*int(count)\n                total_count += int(count)\n                total_price += amount\n\n            # todo: 更新订单信息表中的商品的总数量和总价格\n            order.total_count = total_count\n            order.total_price = total_price\n            order.save()\n        except Exception as e:\n            transaction.savepoint_rollback(save_id)\n            return JsonResponse({'res':7, 'errmsg':'下单失败'})\n\n        # 提交事务\n        transaction.savepoint_commit(save_id)\n\n        # todo: 清除用户购物车中对应的记录\n        conn.hdel(cart_key, *sku_ids)\n\n        # 返回应答\n        return JsonResponse({'res':5, 'message':'创建成功'})\n\n\nclass OrderCommitView(View):\n    '''订单创建'''\n    @transaction.atomic\n    def post(self, request):\n        '''订单创建'''\n        # 判断用户是否登录\n        user = request.user\n        if not user.is_authenticated():\n            # 用户未登录\n            return JsonResponse({'res':0, 'errmsg':'用户未登录'})\n\n        # 接收参数\n        addr_id = request.POST.get('addr_id')\n        pay_method = request.POST.get('pay_method')\n        sku_ids = request.POST.get('sku_ids') # 1,3\n\n        # 校验参数\n        if not all([addr_id, pay_method, sku_ids]):\n            return JsonResponse({'res':1, 'errmsg':'参数不完整'})\n\n        # 校验支付方式\n        if pay_method not in OrderInfo.PAY_METHODS.keys():\n            return JsonResponse({'res':2, 'errmsg':'非法的支付方式'})\n\n        # 校验地址\n        try:\n            addr = Address.objects.get(id=addr_id)\n        except Address.DoesNotExist:\n            # 地址不存在\n            return JsonResponse({'res':3, 'errmsg':'地址非法'})\n\n        # todo: 创建订单核心业务\n\n        # 组织参数\n        # 订单id: 20171122181630+用户id\n        order_id = datetime.now().strftime('%Y%m%d%H%M%S')+str(user.id)\n\n        # 运费\n        transit_price = 10\n\n        # 总数目和总金额\n        total_count = 0\n        total_price = 0\n\n        # 设置事务保存点\n        save_id = transaction.savepoint()\n        try:\n            # todo: 向df_order_info表中添加一条记录\n            order = OrderInfo.objects.create(order_id=order_id,\n                                             user=user,\n                                             addr=addr,\n                                             pay_method=pay_method,\n                                             total_count=total_count,\n                                             total_price=total_price,\n                                             transit_price=transit_price)\n\n            # todo: 用户的订单中有几个商品，需要向df_order_goods表中加入几条记录\n            conn = get_redis_connection('default')\n            cart_key = 'cart_%d'%user.id\n\n            sku_ids = sku_ids.split(',')\n            for sku_id in sku_ids:\n                for i in range(3):\n                    # 获取商品的信息\n                    try:\n                        sku = GoodsSKU.objects.get(id=sku_id)\n                    except:\n                        # 商品不存在\n                        transaction.savepoint_rollback(save_id)\n                        return JsonResponse({'res':4, 'errmsg':'商品不存在'})\n\n                    # 从redis中获取用户所要购买的商品的数量\n                    count = conn.hget(cart_key, sku_id)\n\n                    # todo: 判断商品的库存\n                    if int(count) > sku.stock:\n                        transaction.savepoint_rollback(save_id)\n                        return JsonResponse({'res':6, 'errmsg':'商品库存不足'})\n\n                    # todo: 更新商品的库存和销量\n                    orgin_stock = sku.stock\n                    new_stock = orgin_stock - int(count)\n                    new_sales = sku.sales + int(count)\n\n                    # print('user:%d times:%d stock:%d' % (user.id, i, sku.stock))\n                    # import time\n                    # time.sleep(10)\n\n                    # update df_goods_sku set stock=new_stock, sales=new_sales\n                    # where id=sku_id and stock = orgin_stock\n\n                    # 返回受影响的行数\n                    res = GoodsSKU.objects.filter(id=sku_id, stock=orgin_stock).update(stock=new_stock, sales=new_sales)\n                    if res == 0:\n                        if i == 2:\n                            # 尝试的第3次\n                            transaction.savepoint_rollback(save_id)\n                            return JsonResponse({'res': 7, 'errmsg': '下单失败2'})\n                        continue\n\n                    # todo: 向df_order_goods表中添加一条记录\n                    OrderGoods.objects.create(order=order,\n                                              sku=sku,\n                                              count=count,\n                                              price=sku.price)\n\n                    # todo: 累加计算订单商品的总数量和总价格\n                    amount = sku.price*int(count)\n                    total_count += int(count)\n                    total_price += amount\n\n                    # 跳出循环\n                    break\n\n            # todo: 更新订单信息表中的商品的总数量和总价格\n            order.total_count = total_count\n            order.total_price = total_price\n            order.save()\n        except Exception as e:\n            transaction.savepoint_rollback(save_id)\n            return JsonResponse({'res':7, 'errmsg':'下单失败'})\n\n        # 提交事务\n        transaction.savepoint_commit(save_id)\n\n        # todo: 清除用户购物车中对应的记录\n        conn.hdel(cart_key, *sku_ids)\n\n        # 返回应答\n        return JsonResponse({'res':5, 'message':'创建成功'})\n\n\n# ajax post\n# 前端传递的参数:订单id(order_id)\n# /order/pay\nclass OrderPayView(View):\n    '''订单支付'''\n    def post(self, request):\n        '''订单支付'''\n        # 用户是否登录\n        user = request.user\n        if not user.is_authenticated():\n            return JsonResponse({'res':0, 'errmsg':'用户未登录'})\n\n        # 接收参数\n        order_id = request.POST.get('order_id')\n\n        # 校验参数\n        if not order_id:\n            return JsonResponse({'res':1, 'errmsg':'无效的订单id'})\n\n        try:\n            order = OrderInfo.objects.get(order_id=order_id,\n                                          user=user,\n                                          pay_method=3,\n                                          order_status=1)\n        except OrderInfo.DoesNotExist:\n            return JsonResponse({'res':2, 'errmsg':'订单错误'})\n\n        # 业务处理:使用python sdk调用支付宝的支付接口\n        # 初始化\n        alipay = AliPay(\n            appid=\"2016090800464054\", # 应用id\n            app_notify_url=None,  # 默认回调url\n            app_private_key_path=os.path.join(settings.BASE_DIR, 'apps/order/app_private_key.pem'),\n            alipay_public_key_path=os.path.join(settings.BASE_DIR, 'apps/order/alipay_public_key.pem'), # 支付宝的公钥，验证支付宝回传消息使用，不是你自己的公钥,\n            sign_type=\"RSA2\",  # RSA 或者 RSA2\n            debug=True  # 默认False\n        )\n\n        # 调用支付接口\n        # 电脑网站支付，需要跳转到https://openapi.alipaydev.com/gateway.do? + order_string\n        total_pay = order.total_price+order.transit_price # Decimal\n        order_string = alipay.api_alipay_trade_page_pay(\n            out_trade_no=order_id, # 订单id\n            total_amount=str(total_pay), # 支付总金额\n            subject='天天生鲜%s'%order_id,\n            return_url=None,\n            notify_url=None  # 可选, 不填则使用默认notify url\n        )\n\n        # 返回应答\n        pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string\n        return JsonResponse({'res':3, 'pay_url':pay_url})\n\n\n# ajax post\n# 前端传递的参数:订单id(order_id)\n# /order/check\nclass CheckPayView(View):\n    '''查看订单支付的结果'''\n    def post(self, request):\n        '''查询支付结果'''\n        # 用户是否登录\n        user = request.user\n        if not user.is_authenticated():\n            return JsonResponse({'res': 0, 'errmsg': '用户未登录'})\n\n        # 接收参数\n        order_id = request.POST.get('order_id')\n\n        # 校验参数\n        if not order_id:\n            return JsonResponse({'res': 1, 'errmsg': '无效的订单id'})\n\n        try:\n            order = OrderInfo.objects.get(order_id=order_id,\n                                          user=user,\n                                          pay_method=3,\n                                          order_status=1)\n        except OrderInfo.DoesNotExist:\n            return JsonResponse({'res': 2, 'errmsg': '订单错误'})\n\n        # 业务处理:使用python sdk调用支付宝的支付接口\n        # 初始化\n        alipay = AliPay(\n            appid=\"2016090800464054\",  # 应用id\n            app_notify_url=None,  # 默认回调url\n            app_private_key_path=os.path.join(settings.BASE_DIR, 'apps/order/app_private_key.pem'),\n            alipay_public_key_path=os.path.join(settings.BASE_DIR, 'apps/order/alipay_public_key.pem'),\n            # 支付宝的公钥，验证支付宝回传消息使用，不是你自己的公钥,\n            sign_type=\"RSA2\",  # RSA 或者 RSA2\n            debug=True  # 默认False\n        )\n\n        # 调用支付宝的交易查询接口\n        while True:\n            response = alipay.api_alipay_trade_query(order_id)\n\n            # response = {\n            #         \"trade_no\": \"2017032121001004070200176844\", # 支付宝交易号\n            #         \"code\": \"10000\", # 接口调用是否成功\n            #         \"invoice_amount\": \"20.00\",\n            #         \"open_id\": \"20880072506750308812798160715407\",\n            #         \"fund_bill_list\": [\n            #             {\n            #                 \"amount\": \"20.00\",\n            #                 \"fund_channel\": \"ALIPAYACCOUNT\"\n            #             }\n            #         ],\n            #         \"buyer_logon_id\": \"csq***@sandbox.com\",\n            #         \"send_pay_date\": \"2017-03-21 13:29:17\",\n            #         \"receipt_amount\": \"20.00\",\n            #         \"out_trade_no\": \"out_trade_no15\",\n            #         \"buyer_pay_amount\": \"20.00\",\n            #         \"buyer_user_id\": \"2088102169481075\",\n            #         \"msg\": \"Success\",\n            #         \"point_amount\": \"0.00\",\n            #         \"trade_status\": \"TRADE_SUCCESS\", # 支付结果\n            #         \"total_amount\": \"20.00\"\n            # }\n\n            code = response.get('code')\n\n            if code == '10000' and response.get('trade_status') == 'TRADE_SUCCESS':\n                # 支付成功\n                # 获取支付宝交易号\n                trade_no = response.get('trade_no')\n                # 更新订单状态\n                order.trade_no = trade_no\n                order.order_status = 4 # 待评价\n                order.save()\n                # 返回结果\n                return JsonResponse({'res':3, 'message':'支付成功'})\n            elif code == '40004' or (code == '10000' and response.get('trade_status') == 'WAIT_BUYER_PAY'):\n                # 等待买家付款\n                # 业务处理失败，可能一会就会成功\n                import time\n                time.sleep(5)\n                continue\n            else:\n                # 支付出错\n                print(code)\n                return JsonResponse({'res':4, 'errmsg':'支付失败'})\n\n\nclass CommentView(LoginRequiredMixin, View):\n    \"\"\"订单评论\"\"\"\n    def get(self, request, order_id):\n        \"\"\"提供评论页面\"\"\"\n        user = request.user\n\n        # 校验数据\n        if not order_id:\n            return redirect(reverse('user:order'))\n\n        try:\n            order = OrderInfo.objects.get(order_id=order_id, user=user)\n        except OrderInfo.DoesNotExist:\n            return redirect(reverse(\"user:order\"))\n\n        # 根据订单的状态获取订单的状态标题\n        order.status_name = OrderInfo.ORDER_STATUS[order.order_status]\n\n        # 获取订单商品信息\n        order_skus = OrderGoods.objects.filter(order_id=order_id)\n        for order_sku in order_skus:\n            # 计算商品的小计\n            amount = order_sku.count*order_sku.price\n            # 动态给order_sku增加属性amount,保存商品小计\n            order_sku.amount = amount\n        # 动态给order增加属性order_skus, 保存订单商品信息\n        order.order_skus = order_skus\n\n        # 使用模板\n        return render(request, \"order_comment.html\", {\"order\": order})\n\n    def post(self, request, order_id):\n        \"\"\"处理评论内容\"\"\"\n        user = request.user\n        # 校验数据\n        if not order_id:\n            return redirect(reverse('user:order'))\n\n        try:\n            order = OrderInfo.objects.get(order_id=order_id, user=user)\n        except OrderInfo.DoesNotExist:\n            return redirect(reverse(\"user:order\"))\n\n        # 获取评论条数\n        total_count = request.POST.get(\"total_count\")\n        total_count = int(total_count)\n\n        # 循环获取订单中商品的评论内容\n        for i in range(1, total_count + 1):\n            # 获取评论的商品的id\n            sku_id = request.POST.get(\"sku_%d\" % i) # sku_1 sku_2\n            # 获取评论的商品的内容\n            content = request.POST.get('content_%d' % i, '') # cotent_1 content_2 content_3\n            try:\n                order_goods = OrderGoods.objects.get(order=order, sku_id=sku_id)\n            except OrderGoods.DoesNotExist:\n                continue\n\n            order_goods.comment = content\n            order_goods.save()\n\n        order.order_status = 5 # 已完成\n        order.save()\n\n        return redirect(reverse(\"user:order\", kwargs={\"page\": 1}))\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "dailyfresh/apps/user/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/user/admin.py",
    "content": "from django.contrib import admin\n\n# Register your models here.\n"
  },
  {
    "path": "dailyfresh/apps/user/migrations/0001_initial.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.contrib.auth.models\nimport django.core.validators\nimport django.utils.timezone\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n        ('auth', '0006_require_contenttypes_0002'),\n    ]\n\n    operations = [\n        migrations.CreateModel(\n            name='User',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('password', models.CharField(verbose_name='password', max_length=128)),\n                ('last_login', models.DateTimeField(verbose_name='last login', blank=True, null=True)),\n                ('is_superuser', models.BooleanField(verbose_name='superuser status', default=False, help_text='Designates that this user has all permissions without explicitly assigning them.')),\n                ('username', models.CharField(validators=[django.core.validators.RegexValidator('^[\\\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], max_length=30, error_messages={'unique': 'A user with that username already exists.'}, unique=True, verbose_name='username', help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.')),\n                ('first_name', models.CharField(verbose_name='first name', blank=True, max_length=30)),\n                ('last_name', models.CharField(verbose_name='last name', blank=True, max_length=30)),\n                ('email', models.EmailField(verbose_name='email address', blank=True, max_length=254)),\n                ('is_staff', models.BooleanField(verbose_name='staff status', default=False, help_text='Designates whether the user can log into this admin site.')),\n                ('is_active', models.BooleanField(verbose_name='active', default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.')),\n                ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('groups', models.ManyToManyField(related_name='user_set', blank=True, to='auth.Group', verbose_name='groups', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_query_name='user')),\n                ('user_permissions', models.ManyToManyField(related_name='user_set', blank=True, to='auth.Permission', verbose_name='user permissions', help_text='Specific permissions for this user.', related_query_name='user')),\n            ],\n            options={\n                'verbose_name': '用户',\n                'db_table': 'df_user',\n                'verbose_name_plural': '用户',\n            },\n            managers=[\n                ('objects', django.contrib.auth.models.UserManager()),\n            ],\n        ),\n        migrations.CreateModel(\n            name='Address',\n            fields=[\n                ('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),\n                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),\n                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),\n                ('is_delete', models.BooleanField(verbose_name='删除标记', default=False)),\n                ('receiver', models.CharField(verbose_name='收件人', max_length=20)),\n                ('addr', models.CharField(verbose_name='收件地址', max_length=256)),\n                ('zip_code', models.CharField(verbose_name='邮政编码', max_length=6, null=True)),\n                ('phone', models.CharField(verbose_name='联系电话', max_length=11)),\n                ('is_default', models.BooleanField(verbose_name='是否默认', default=False)),\n                ('user', models.ForeignKey(verbose_name='所属账户', to=settings.AUTH_USER_MODEL)),\n            ],\n            options={\n                'verbose_name': '地址',\n                'db_table': 'df_address',\n                'verbose_name_plural': '地址',\n            },\n        ),\n    ]\n"
  },
  {
    "path": "dailyfresh/apps/user/migrations/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/apps/user/models.py",
    "content": "from django.db import models\nfrom django.contrib.auth.models import AbstractUser\nfrom db.base_model import BaseModel\n# Create your models here.\n\n\nclass User(AbstractUser, BaseModel):\n    '''用户模型类'''\n\n    class Meta:\n        db_table = 'df_user'\n        verbose_name = '用户'\n        verbose_name_plural = verbose_name\n\n\nclass AddressManager(models.Manager):\n    '''地址模型管理器类'''\n    # 1.改变原有查询的结果集:all()\n    # 2.封装方法:用户操作模型类对应的数据表(增删改查)\n    def get_default_address(self, user):\n        '''获取用户默认收货地址'''\n        # self.model:获取self对象所在的模型类\n        try:\n            address = self.get(user=user, is_default=True)  # models.Manager\n        except self.model.DoesNotExist:\n            # 不存在默认收货地址\n            address = None\n\n        return address\n\n\nclass Address(BaseModel):\n    '''地址模型类'''\n    user = models.ForeignKey('User', verbose_name='所属账户')\n    receiver = models.CharField(max_length=20, verbose_name='收件人')\n    addr = models.CharField(max_length=256, verbose_name='收件地址')\n    zip_code = models.CharField(max_length=6, null=True, verbose_name='邮政编码')\n    phone = models.CharField(max_length=11, verbose_name='联系电话')\n    is_default = models.BooleanField(default=False, verbose_name='是否默认')\n\n    # 自定义一个模型管理器对象\n    objects = AddressManager()\n\n    class Meta:\n        db_table = 'df_address'\n        verbose_name = '地址'\n        verbose_name_plural = verbose_name\n"
  },
  {
    "path": "dailyfresh/apps/user/tests.py",
    "content": "from django.test import TestCase\n\n# Create your tests here.\n"
  },
  {
    "path": "dailyfresh/apps/user/urls.py",
    "content": "from django.conf.urls import url\nfrom django.contrib.auth.decorators import login_required\nfrom user.views import RegisterView, ActiveView, LoginView, LogoutView, UserInfoView, UserOrderView, AddressView\n\nurlpatterns = [\n    # url(r'^register$', views.register, name='register'), # 注册\n    # url(r'^register_handle$', views.register_handle, name='register_handle'), # 注册处理\n\n    url(r'^register$', RegisterView.as_view(), name='register'), # 注册\n    url(r'^active/(?P<token>.*)$', ActiveView.as_view(), name='active'), # 用户激活\n\n    url(r'^login$', LoginView.as_view(), name='login'), # 登录\n    url(r'^logout$', LogoutView.as_view(), name='logout'), # 注销登录\n\n    # url(r'^$', login_required(UserInfoView.as_view()), name='user'), # 用户中心-信息页\n    # url(r'^order$', login_required(UserOrderView.as_view()), name='order'), # 用户中心-订单页\n    # url(r'^address$', login_required(AddressView.as_view()), name='address'), # 用户中心-地址页\n\n    url(r'^$', UserInfoView.as_view(), name='user'), # 用户中心-信息页\n    url(r'^order/(?P<page>\\d+)$', UserOrderView.as_view(), name='order'), # 用户中心-订单页\n    # url(r'^order$', UserOrderView.as_view(), name='order'), # 用户中心-订单页\n    url(r'^address$', AddressView.as_view(), name='address'), # 用户中心-地址页\n]"
  },
  {
    "path": "dailyfresh/apps/user/views.py",
    "content": "from django.shortcuts import render,redirect\nfrom django.core.urlresolvers import reverse\nfrom django.core.mail import send_mail\nfrom django.contrib.auth import authenticate, login, logout\nfrom django.core.paginator import Paginator\nfrom django.views.generic import View\nfrom django.http import HttpResponse,JsonResponse\nfrom django.conf import settings\n\nfrom user.models import User, Address\nfrom goods.models import GoodsSKU\nfrom order.models import OrderInfo,OrderGoods\n\nfrom celery_tasks.tasks import send_register_active_email\nfrom itsdangerous import TimedJSONWebSignatureSerializer as Serializer\nfrom itsdangerous import SignatureExpired\nfrom utils.mixin import LoginRequiredMixin\nfrom django_redis import get_redis_connection\nimport re\nimport time\n# Create your views here.\n\n\n# /user/register\n# GET POST PUT DELETE OPTION\ndef register(request):\n    '''注册'''\n    if request.method == 'GET':\n        # 显示注册页面\n        return render(request, 'register.html')\n    else:\n        # 进行注册处理\n        # 接收数据\n        username = request.POST.get('user_name')\n        password = request.POST.get('pwd')\n        email = request.POST.get('email')\n        allow = request.POST.get('allow')  # 用户使用协议\n\n        # 进行数据校验 all里面的参数都为真时则返回真\n        if not all([username, password, email]):\n            # 数据不完整\n            return render(request, 'register.html', {'errmsg': '数据不完整'})\n\n        # 校验邮箱 使用正则，导入re库\n        if not re.match(r'^[a-z0-9][\\w.\\-]*@[a-z0-9\\-]+(\\.[a-z]{2,5}){1,2}$', email):\n            return render(request, 'register.html', {'errmsg': '邮箱格式不正确'})\n\n        if allow != 'on':\n            return render(request, 'register.html', {'errmsg': '请同意协议'})\n\n        # 校验用户名是否重复\n        try:\n            user = User.objects.get(username=username)\n        except User.DoesNotExist:\n            # 用户名不存在\n            user = None\n\n        if user:\n            # 用户名已存在\n            return render(request, 'register.html', {'errmsg': '用户名已存在'})\n\n        # 进行业务处理: 进行用户注册 Django内置方法\n        user = User.objects.create_user(username, email, password)\n        user.is_active = 0\n        user.save()\n\n        # 返回应答, 跳转到首页，reverse方向解析函数\n        return redirect(reverse('goods:index'))\n\n\ndef register_handle(request):\n    '''进行注册处理'''\n    # 接收数据\n    username = request.POST.get('user_name')\n    password = request.POST.get('pwd')\n    email = request.POST.get('email')\n    allow = request.POST.get('allow')\n\n    # 进行数据校验\n    if not all([username, password, email]):\n        # 数据不完整\n        return render(request, 'register.html', {'errmsg':'数据不完整'})\n\n    # 校验邮箱\n    if not re.match(r'^[a-z0-9][\\w.\\-]*@[a-z0-9\\-]+(\\.[a-z]{2,5}){1,2}$', email):\n        return render(request, 'register.html', {'errmsg':'邮箱格式不正确'})\n\n    if allow != 'on':\n        return render(request, 'register.html', {'errmsg':'请同意协议'})\n\n    # 校验用户名是否重复\n    try:\n        user = User.objects.get(username=username)\n    except User.DoesNotExist:\n        # 用户名不存在\n        user = None\n\n    if user:\n        # 用户名已存在\n        return render(request, 'register.html', {'errmsg':'用户名已存在'})\n\n    # 进行业务处理: 进行用户注册\n    user = User.objects.create_user(username, email, password)\n    user.is_active = 0\n    user.save()\n\n    # 返回应答, 跳转到首页\n    return redirect(reverse('goods:index'))\n\n\n# /user/register\nclass RegisterView(View):\n    '''注册'''\n    def get(self, request):\n        '''显示注册页面'''\n        return render(request, 'register.html')\n\n    def post(self, request):\n        '''进行注册处理'''\n        # 接收数据\n        username = request.POST.get('user_name')\n        password = request.POST.get('pwd')\n        email = request.POST.get('email')\n        allow = request.POST.get('allow')\n\n        # 进行数据校验\n        if not all([username, password, email]):\n            # 数据不完整\n            return render(request, 'register.html', {'errmsg': '数据不完整'})\n\n        # 校验邮箱\n        if not re.match(r'^[a-z0-9][\\w.\\-]*@[a-z0-9\\-]+(\\.[a-z]{2,5}){1,2}$', email):\n            return render(request, 'register.html', {'errmsg': '邮箱格式不正确'})\n\n        if allow != 'on':\n            return render(request, 'register.html', {'errmsg': '请同意协议'})\n\n        # 校验用户名是否重复\n        try:\n            user = User.objects.get(username=username)\n        except User.DoesNotExist:\n            # 用户名不存在\n            user = None\n\n        if user:\n            # 用户名已存在\n            return render(request, 'register.html', {'errmsg': '用户名已存在'})\n\n        # 进行业务处理: 进行用户注册\n        user = User.objects.create_user(username, email, password)\n        user.is_active = 0\n        user.save()\n\n        # 发送激活邮件，包含激活链接: http://127.0.0.1:8000/user/active/3\n        # 激活链接中需要包含用户的身份信息, 并且要把身份信息进行加密\n\n        # 加密用户的身份信息，生成激活token\n        serializer = Serializer(settings.SECRET_KEY, 3600)\n        info = {'confirm':user.id}\n        token = serializer.dumps(info) # bytes 字节流\n        token = token.decode()  # 字节流转换成字符串\n\n        # 发邮件\n        send_register_active_email.delay(email, username, token)\n\n        # 返回应答, 跳转到首页\n        return redirect(reverse('goods:index'))\n\n\nclass ActiveView(View):\n    '''用户激活'''\n    def get(self, request, token):\n        '''进行用户激活'''\n        # 进行解密，获取要激活的用户信息\n        serializer = Serializer(settings.SECRET_KEY, 3600)\n        try:\n            info = serializer.loads(token)\n            # 获取待激活用户的id\n            user_id = info['confirm']\n\n            # 根据id获取用户信息\n            user = User.objects.get(id=user_id)\n            user.is_active = 1\n            user.save()\n\n            # 跳转到登录页面\n            return redirect(reverse('user:login'))\n        except SignatureExpired as e:\n            # 激活链接已过期\n            return HttpResponse('激活链接已过期')\n\n\n# /user/login\nclass LoginView(View):\n    '''登录'''\n    def get(self, request):\n        '''显示登录页面'''\n        # 判断是否记住了用户名\n        if 'username' in request.COOKIES:\n            username = request.COOKIES.get('username')\n            checked = 'checked'\n        else:\n            username = ''\n            checked = ''\n\n        # 使用模板\n        return render(request, 'login.html', {'username':username, 'checked':checked})\n\n    def post(self, request):\n        '''登录校验'''\n        # 接收数据\n        username = request.POST.get('username')\n        password = request.POST.get('pwd')\n\n        # 校验数据\n        if not all([username, password]):\n            return render(request, 'login.html', {'errmsg':'数据不完整'})\n\n        # 业务处理:登录校验\n        user = authenticate(username=username, password=password)\n        if user is not None:\n            # 用户名密码正确\n            if user.is_active:\n                # 用户已激活\n                # 记录用户的登录状态\n                login(request, user)\n\n                # 获取登录后所要跳转到的地址\n                # 默认跳转到首页\n                next_url = request.GET.get('next', reverse('goods:index'))\n\n                # 跳转到next_url\n                response = redirect(next_url) # HttpResponseRedirect\n\n                # 判断是否需要记住用户名\n                remember = request.POST.get('remember')\n\n                if remember == 'on':\n                    # 记住用户名\n                    response.set_cookie('username', username, max_age=7*24*3600)\n                else:\n                    response.delete_cookie('username')\n\n                # 返回response\n                return response\n            else:\n                # 用户未激活\n                return render(request, 'login.html', {'errmsg':'账户未激活'})\n        else:\n            # 用户名或密码错误\n            return render(request, 'login.html', {'errmsg':'用户名或密码错误'})\n\n\n# /user/logout\nclass LogoutView(View):\n    '''退出登录'''\n    def get(self, request):\n        '''退出登录'''\n        # 清除用户的session信息\n        logout(request)\n\n        # 跳转到首页\n        return redirect(reverse('goods:index'))\n\n\n# /user\nclass UserInfoView(LoginRequiredMixin, View):\n    '''用户中心-信息页'''\n    def get(self, request):\n        '''显示'''\n        # Django会给request对象添加一个属性request.user\n        # 如果用户未登录->user是AnonymousUser类的一个实例对象\n        # 如果用户登录->user是User类的一个实例对象\n        # request.user.is_authenticated()\n\n        # 获取用户的个人信息\n        user = request.user\n        address = Address.objects.get_default_address(user)\n\n        # 获取用户的历史浏览记录\n        # from redis import StrictRedis\n        # sr = StrictRedis(host='172.16.179.130', port='6379', db=9)\n        con = get_redis_connection('default')\n\n        history_key = 'history_%d'%user.id\n\n        # 获取用户最新浏览的5个商品的id\n        sku_ids = con.lrange(history_key, 0, 4) # [2,3,1]\n\n        # 从数据库中查询用户浏览的商品的具体信息\n        # goods_li = GoodsSKU.objects.filter(id__in=sku_ids)\n        #\n        # goods_res = []\n        # for a_id in sku_ids:\n        #     for goods in goods_li:\n        #         if a_id == goods.id:\n        #             goods_res.append(goods)\n\n        # 遍历获取用户浏览的商品信息\n        goods_li = []\n        for id in sku_ids:\n            goods = GoodsSKU.objects.get(id=id)\n            goods_li.append(goods)\n\n        # 组织上下文\n        context = {'page':'user',\n                   'address':address,\n                   'goods_li':goods_li}\n\n        # 除了你给模板文件传递的模板变量之外，django框架会把request.user也传给模板文件\n        return render(request, 'user_center_info.html', context)\n\n\n# /user/order\nclass UserOrderView(LoginRequiredMixin, View):\n    '''用户中心-订单页'''\n    def get(self, request, page):\n        '''显示'''\n        # 获取用户的订单信息\n        user = request.user\n        orders = OrderInfo.objects.filter(user=user).order_by('-create_time')\n\n        # 遍历获取订单商品的信息\n        for order in orders:\n            # 根据order_id查询订单商品信息\n            order_skus = OrderGoods.objects.filter(order_id=order.order_id)\n\n            # 遍历order_skus计算商品的小计\n            for order_sku in order_skus:\n                # 计算小计\n                amount = order_sku.count*order_sku.price\n                # 动态给order_sku增加属性amount,保存订单商品的小计\n                order_sku.amount = amount\n\n            # 动态给order增加属性，保存订单状态标题\n            order.status_name = OrderInfo.ORDER_STATUS[order.order_status]\n            # 动态给order增加属性，保存订单商品的信息\n            order.order_skus = order_skus\n\n        # 分页\n        paginator = Paginator(orders, 1)\n\n        # 获取第page页的内容\n        try:\n            page = int(page)\n        except Exception as e:\n            page = 1\n\n        if page > paginator.num_pages:\n            page = 1\n\n        # 获取第page页的Page实例对象\n        order_page = paginator.page(page)\n\n        # todo: 进行页码的控制，页面上最多显示5个页码\n        # 1.总页数小于5页，页面上显示所有页码\n        # 2.如果当前页是前3页，显示1-5页\n        # 3.如果当前页是后3页，显示后5页\n        # 4.其他情况，显示当前页的前2页，当前页，当前页的后2页\n        num_pages = paginator.num_pages\n        if num_pages < 5:\n            pages = range(1, num_pages + 1)\n        elif page <= 3:\n            pages = range(1, 6)\n        elif num_pages - page <= 2:\n            pages = range(num_pages - 4, num_pages + 1)\n        else:\n            pages = range(page - 2, page + 3)\n\n        # 组织上下文\n        context = {'order_page':order_page,\n                   'pages':pages,\n                   'page': 'order'}\n\n        # 使用模板\n        return render(request, 'user_center_order.html', context)\n\n\n# /user/address\nclass AddressView(LoginRequiredMixin, View):\n    '''用户中心-地址页'''\n    def get(self, request):\n        '''显示'''\n        # 获取登录用户对应User对象\n        user = request.user\n\n        # 获取用户的默认收货地址\n        try:\n            address = Address.objects.get(user=user, is_default=True) # models.Manager\n        except Address.DoesNotExist:\n            # 不存在默认收货地址\n            address = None\n        # address = Address.objects.get_default_address(user)\n\n        # 使用模板\n        return render(request, 'user_center_site.html', {'page':'address', 'address':address})\n\n    def post(self, request):\n        '''地址的添加'''\n        # 接收数据\n        receiver = request.POST.get('receiver')\n        addr = request.POST.get('addr')\n        zip_code = request.POST.get('zip_code')\n        phone = request.POST.get('phone')\n\n        # 校验数据\n        if not all([receiver, addr, phone, type]):\n            return render(request, 'user_center_site.html', {'errmsg':'数据不完整'})\n\n        # 校验手机号\n        if not re.match(r'^1[3|4|5|7|8][0-9]{9}$', phone):\n            return render(request, 'user_center_site.html', {'errmsg':'手机格式不正确'})\n\n        # 业务处理：地址添加\n        # 如果用户已存在默认收货地址，添加的地址不作为默认收货地址，否则作为默认收货地址\n        # 获取登录用户对应User对象\n        user = request.user\n\n        # try:\n        #     address = Address.objects.get(user=user, is_default=True)\n        # except Address.DoesNotExist:\n        #     # 不存在默认收货地址\n        #     address = None\n\n        address = Address.objects.get_default_address(user)\n\n        if address:\n            is_default = False\n        else:\n            is_default = True\n\n        # 添加地址\n        Address.objects.create(user=user,\n                               receiver=receiver,\n                               addr=addr,\n                               zip_code=zip_code,\n                               phone=phone,\n                               is_default=is_default)\n\n        # 返回应答,刷新地址页面\n        return redirect(reverse('user:address')) # get请求方式\n\n\n\n\n\n\n"
  },
  {
    "path": "dailyfresh/celery_tasks/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/celery_tasks/tasks.py",
    "content": "# 使用celery\nfrom django.core.mail import send_mail\nfrom django.conf import settings\nfrom django.template import loader, RequestContext\nfrom celery import Celery\nimport time\n\n# 在任务处理者一端加这几句,Django环境的初始化\nimport os\nimport django\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"dailyfresh.settings\")\ndjango.setup()\n\nfrom goods.models import GoodsType,IndexGoodsBanner,IndexPromotionBanner,IndexTypeGoodsBanner\n# from django_redis import get_redis_connection\n\n# 创建一个Celery类的实例对象 第一个参数一般写的是路径，broker使用redis，8代表8号数据库\napp = Celery('celery_tasks.tasks', broker='redis://127.0.0.1:6379/8')\n\n\n# 定义任务函数（发邮件）\n@app.task\ndef send_register_active_email(to_email, username, token):\n    '''发送激活邮件'''\n    # 组织邮件信息\n    subject = '天天生鲜欢迎信息'\n    message = ''\n    sender = settings.EMAIL_FROM\n    receiver = [to_email]\n    html_message = '<h1>%s, 欢迎您成为天天生鲜注册会员</h1>请点击下面链接激活您的账户<br/><a href=\"http://127.0.0.1:8000/user/active/%s\">http://127.0.0.1:8000/user/active/%s</a>' % (username, token, token)\n\n    send_mail(subject, message, sender, receiver, html_message=html_message)\n    time.sleep(5)\n\n\n@app.task\ndef generate_static_index_html():\n    '''产生首页静态页面'''\n    # 获取商品的种类信息\n    types = GoodsType.objects.all()\n\n    # 获取首页轮播商品信息\n    goods_banners = IndexGoodsBanner.objects.all().order_by('index')\n\n    # 获取首页促销活动信息\n    promotion_banners = IndexPromotionBanner.objects.all().order_by('index')\n\n    # 获取首页分类商品展示信息\n    for type in types:  # GoodsType\n        # 获取type种类首页分类商品的图片展示信息\n        image_banners = IndexTypeGoodsBanner.objects.filter(type=type, display_type=1).order_by('index')\n        # 获取type种类首页分类商品的文字展示信息\n        title_banners = IndexTypeGoodsBanner.objects.filter(type=type, display_type=0).order_by('index')\n\n        # 动态给type增加属性，分别保存首页分类商品的图片展示信息和文字展示信息\n        type.image_banners = image_banners\n        type.title_banners = title_banners\n\n\n    # 组织模板上下文\n    context = {'types': types,\n               'goods_banners': goods_banners,\n               'promotion_banners': promotion_banners}\n\n    # 使用模板\n    # 1.加载模板文件,返回模板对象\n    temp = loader.get_template('static_index.html')\n    # 2.模板渲染\n    static_index_html = temp.render(context)\n    print(static_index_html)\n    # 生成首页对应静态文件\n    save_path = os.path.join(settings.BASE_DIR, 'static/index.html')\n    print(save_path)\n    with open(save_path, 'w') as f:\n        f.write(static_index_html)\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "dailyfresh/dailyfresh/__init__.py",
    "content": "import pymysql\npymysql.install_as_MySQLdb()"
  },
  {
    "path": "dailyfresh/dailyfresh/settings.py",
    "content": "\"\"\"\nDjango settings for dailyfresh project.\n\nGenerated by 'django-admin startproject' using Django 1.8.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.8/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\nimport sys\n\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\nsys.path.insert(0, os.path.join(BASE_DIR, 'apps'))\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'bga5t#n-a9=mx^glxprkc#16c#z*n_t%o8jiwh(y*i+h7c!xo$'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n# DEBUG = True\nALLOWED_HOSTS = ['*']\n# ALLOWED_HOSTS = []\n\n# Application definition\n\nINSTALLED_APPS = (\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'tinymce', # 富文本编辑器\n    'haystack', # 注册全文检索框架\n    'user', # 用户模块\n    'goods', # 商品模块\n    'cart', # 购物车模块\n    'order', # 订单模块\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'django.middleware.security.SecurityMiddleware',\n)\n\nROOT_URLCONF = 'dailyfresh.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [os.path.join(BASE_DIR, 'templates')],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'dailyfresh.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.mysql',\n        'NAME': 'dailyfresh',\n        'USER': 'root',\n        'PASSWORD': '123456',\n        'HOST': 'localhost',\n        'PORT':3306,\n    }\n}\n\n# django认证系统使用的模型类\nAUTH_USER_MODEL='user.User' # python manage.py createsuper\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.8/topics/i18n/\n\nLANGUAGE_CODE = 'zh-hans'\n\nTIME_ZONE = 'Asia/Shanghai'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\n\nSTATIC_URL = '/static/'\nSTATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]\n# 指定收集静态文件的路径\nSTATIC_ROOT='/var/www/dailyfresh/static'\n\n# 富文本编辑器配置\nTINYMCE_DEFAULT_CONFIG = {\n    'theme': 'advance',\n    'width': 600,\n    'height': 400,\n}\n\n# 发送邮件配置\nEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n# smpt服务地址\nEMAIL_HOST = 'smtp.qq.com'\nEMAIL_PORT = 25\n# 发送邮件的邮箱\nEMAIL_HOST_USER = '171628543@qq.com'\n# 在邮箱中设置的客户端授权密码\nEMAIL_HOST_PASSWORD = 'eqpqbdxruabebibh'\n# 收件人看到的发件人\nEMAIL_FROM = '天天生鲜<171628543@qq.com>'\n\n\n# Django的缓存配置\nCACHES = {\n    \"default\": {\n        \"BACKEND\": \"django_redis.cache.RedisCache\",\n        \"LOCATION\": \"redis://127.0.0.1:6379/9\",\n        \"OPTIONS\": {\n            \"CLIENT_CLASS\": \"django_redis.client.DefaultClient\",\n        }\n    }\n}\n\n# 配置session存储\nSESSION_ENGINE = \"django.contrib.sessions.backends.cache\"\nSESSION_CACHE_ALIAS = \"default\"\n\n# 配置登录url地址\nLOGIN_URL='/user/login' # /accounts/login?next=/user\n\n# 设置Django的文件存储类\nDEFAULT_FILE_STORAGE='utils.fdfs.storage.FDFSStorage'\n\n# 设置fdfs使用的client.conf文件路径\nFDFS_CLIENT_CONF='./utils/fdfs/client.conf'\n\n# 设置fdfs存储服务器上nginx的IP和端口号\nFDFS_URL='http://192.168.31.89:8888/'\n\n# 全文检索框架的配置\nHAYSTACK_CONNECTIONS = {\n    'default': {\n        # 使用whoosh引擎\n        'ENGINE': 'haystack.backends.whoosh_cn_backend.WhooshEngine',\n        # 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',\n        # 索引文件路径\n        'PATH': os.path.join(BASE_DIR, 'whoosh_index'),\n    }\n}\n\n# 当添加、修改、删除数据时，自动生成索引\nHAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'\n\n# 指定搜索结果每页显示的条数\nHAYSTACK_SEARCH_RESULTS_PER_PAGE=1\n"
  },
  {
    "path": "dailyfresh/dailyfresh/urls.py",
    "content": "\"\"\"dailyfresh URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n    1. Add an import:  from my_app import views\n    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')\nClass-based views\n    1. Add an import:  from other_app.views import Home\n    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')\nIncluding another URLconf\n    1. Add an import:  from blog import urls as blog_urls\n    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))\n\"\"\"\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nurlpatterns = [\n    url(r'^admin/', include(admin.site.urls)),\n    url(r'^tinymce/', include('tinymce.urls')), # 富文本编辑器\n    url(r'^search', include('haystack.urls')), # 全文检索框架\n    url(r'^user/', include('user.urls', namespace='user')), # 用户模块\n    url(r'^cart/', include('cart.urls', namespace='cart')), # 购物车模块\n    url(r'^order/', include('order.urls', namespace='order')), # 订单模块\n    url(r'^', include('goods.urls', namespace='goods')), # 商品模块\n]\n"
  },
  {
    "path": "dailyfresh/dailyfresh/wsgi.py",
    "content": "\"\"\"\nWSGI config for dailyfresh project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/\n\"\"\"\n\nimport os\n\nfrom django.core.wsgi import get_wsgi_application\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"dailyfresh.settings\")\n\napplication = get_wsgi_application()\n"
  },
  {
    "path": "dailyfresh/dailyfresh.sql",
    "content": "/*!40000 ALTER TABLE `df_goods` DISABLE KEYS */;\nINSERT INTO `df_goods` VALUES (1,'2017-11-15 03:03:05.257969','2017-11-15 03:03:05.258130',0,'草莓','<p><strong>很不错的草莓</strong></p>'),(2,'2017-11-15 03:05:36.964951','2017-11-15 03:05:36.965129',0,'葡萄',''),(3,'2017-11-15 03:05:52.323866','2017-11-15 03:05:52.323949',0,'柠檬',''),(4,'2017-11-15 03:06:01.267481','2017-11-15 03:06:01.267615',0,'奇异果',''),(5,'2017-11-15 03:06:30.418683','2017-11-15 03:06:30.418789',0,'大青虾',''),(6,'2017-11-15 03:06:35.994464','2017-11-15 03:06:35.994567',0,'秋刀鱼',''),(7,'2017-11-15 03:06:48.115318','2017-11-15 03:06:48.115410',0,'扇贝',''),(8,'2017-11-15 03:07:03.057514','2017-11-15 03:07:03.057601',0,'基围虾',''),(9,'2017-11-15 03:07:36.306725','2017-11-15 03:07:36.306926',0,'猪肉',''),(10,'2017-11-15 03:07:39.056064','2017-11-15 03:07:39.056145',0,'牛肉',''),(11,'2017-11-15 03:07:41.955755','2017-11-15 03:07:41.955833',0,'羊肉',''),(12,'2017-11-15 03:07:44.741474','2017-11-15 03:07:44.741574',0,'牛排',''),(13,'2017-11-15 03:07:51.748699','2017-11-15 03:07:51.748828',0,'鸡蛋',''),(14,'2017-11-15 03:07:56.413773','2017-11-15 03:07:56.413853',0,'鸡肉',''),(15,'2017-11-15 03:07:59.568405','2017-11-15 03:07:59.568554',0,'鸭蛋',''),(16,'2017-11-15 03:08:03.020608','2017-11-15 03:08:03.020764',0,'鸡腿',''),(17,'2017-11-15 03:08:10.063820','2017-11-15 03:08:10.063898',0,'白菜',''),(18,'2017-11-15 03:08:13.315906','2017-11-15 03:08:13.316025',0,'芹菜',''),(19,'2017-11-15 03:08:16.351445','2017-11-15 03:08:16.351526',0,'香菜',''),(20,'2017-11-15 03:08:24.232660','2017-11-15 03:08:24.232743',0,'冬瓜',''),(21,'2017-11-15 03:08:36.939678','2017-11-15 03:08:36.940113',0,'鱼丸',''),(22,'2017-11-15 03:08:43.194862','2017-11-15 03:08:43.194985',0,'蟹棒',''),(23,'2017-11-15 03:08:50.771785','2017-11-15 03:08:50.771931',0,'虾丸',''),(24,'2017-11-15 03:09:01.546052','2017-11-15 03:09:01.546152',0,'速冻水饺',''),(25,'2017-11-14 08:50:50.383071','2017-11-14 08:50:50.383115',0,'芒果',''),(26,'2017-11-17 07:54:26.657410','2017-11-17 07:54:26.657443',0,'鹌鹑蛋',''),(27,'2017-11-17 07:54:35.205668','2017-11-17 07:54:35.205703',0,'鹅蛋',''),(28,'2017-11-17 07:54:46.756236','2017-11-17 07:54:46.756272',0,'红辣椒','');\n/*!40000 ALTER TABLE `df_goods` ENABLE KEYS */;\n\n\n\n/*!40000 ALTER TABLE `df_goods_sku` DISABLE KEYS */;\nINSERT INTO `df_goods_sku` VALUES (1,'2017-11-15 03:10:14.045538','2017-11-14 08:24:49.138489',0,'草莓 500g','草莓简介',10.00,'500g','group1/M00/00/00/rBCzg1oKqFGAR2tjAAAljHPuXJg4272079',98,0,1,1,1),(2,'2017-11-15 03:11:04.490384','2017-11-14 08:44:43.484243',0,'盒装草莓','草莓简介',20.00,'盒','group1/M00/00/00/rBCzg1oKrPuAKse1AAEc8FlxEvU2553153',10,0,1,1,1),(3,'2017-11-15 03:12:32.165020','2017-11-14 08:25:22.505620',0,'葡萄','葡萄简介',20.00,'500g','group1/M00/00/00/rBCzg1oKqHKAYfXaAAAjjiYTEkw5436358',7,0,1,2,1),(4,'2017-11-15 03:13:16.457844','2017-11-14 08:25:34.181904',0,'柠檬','简介',32.00,'500g','group1/M00/00/00/rBCzg1oKqH6AMZt_AAAgnaeGwNQ6246033',12,0,1,3,1),(5,'2017-11-15 03:14:05.799352','2017-11-14 08:25:56.427676',0,'奇异果','简介',12.12,'500g','group1/M00/00/00/rBCzg1oKqJSAS1xIAAAeuLYy0pU6253560',12,0,1,4,1),(6,'2017-11-15 03:15:09.971968','2017-11-14 08:26:09.113586',0,'大青虾','简介',34.00,'500g','group1/M00/00/00/rBCzg1oKqKGAFAV-AAA5OS4Kl4c4097622',12,0,1,5,2),(7,'2017-11-15 03:15:53.812181','2017-11-14 08:26:19.094675',0,'北海道秋刀鱼','简介',50.00,'500g','group1/M00/00/00/rBCzg1oKqKuAavf8AAAkaP_7_187862565',15,0,1,6,2),(8,'2017-11-15 03:16:24.763232','2017-11-14 08:26:31.121824',0,'扇贝','简介',56.60,'500g','group1/M00/00/00/rBCzg1oKqLeATLQAAAAk8WCqqmI2968215',13,0,1,7,2),(9,'2017-11-15 03:17:13.426611','2017-11-14 08:26:58.739624',0,'基围虾','简介',100.90,'500g','group1/M00/00/00/rBCzg1oKqNKANQKOAAAk0DN4-yE7007770',14,0,1,8,2),(10,'2017-11-15 03:17:47.656066','2017-11-14 08:29:56.158261',0,'猪肉','简介',23.99,'500g','group1/M00/00/00/rBCzg1oKqYSASWr0AAEVpb1YHUE4011268',100,0,1,9,3),(11,'2017-11-15 03:18:15.497630','2017-11-14 08:31:27.169999',0,'牛肉','简介',34.99,'500g','group1/M00/00/00/rBCzg1oKqd-AUsoBAAEExAU4yXU2908730',100,0,1,10,3),(12,'2017-11-15 03:18:44.453933','2017-11-14 08:32:22.493340',0,'羊肉','简介',56.99,'500g','group1/M00/00/00/rBCzg1oKqhaAKgwkAAB6NOQDrpk3374052',100,0,1,11,3),(13,'2017-11-15 03:19:10.209472','2017-11-14 08:33:15.061544',0,'牛排','简介',99.99,'500g','group1/M00/00/00/rBCzg1oKqkuAUD0WAACwa3rCDPQ3064181',100,0,1,12,3),(14,'2017-11-15 03:19:44.020204','2017-11-14 08:34:31.275370',0,'盒装鸡蛋','简介',23.00,'500g','group1/M00/00/00/rBCzg1oKqpeAZnSEAADUKbwLSqY1972845',100,0,1,13,4),(15,'2017-11-15 03:20:20.962831','2017-11-14 08:35:21.725162',0,'鸡肉','简介',32.00,'500g','group1/M00/00/00/rBCzg1oKqsmAVxzcAADUY5hC_sI5143658',100,0,1,14,4),(16,'2017-11-15 03:20:53.724305','2017-11-14 08:37:27.336911',0,'鸭蛋','简介',45.00,'盒','group1/M00/00/00/rBCzg1oKq0eAMxKFAAFC_2tSkFo4950479',121,0,1,15,4),(17,'2017-11-15 03:21:22.965398','2017-11-14 08:38:08.440778',0,'鸡腿','简介',45.00,'500g','group1/M00/00/00/rBCzg1oKq3CADiewAAA2_p7G96w3860045',12,0,1,16,4),(18,'2017-11-15 03:22:04.462490','2017-11-14 08:38:45.119926',0,'白菜','简介',4.50,'500g','group1/M00/00/00/rBCzg1oKq5WAQnWDAADWHYeKaNI7952227',100,0,1,17,5),(19,'2017-11-15 03:22:31.745392','2017-11-14 08:39:40.030728',0,'芹菜','简介',3.50,'500g','group1/M00/00/00/rBCzg1oKq8yAa_CvAACIrzuaK646641688',12,0,1,18,5),(20,'2017-11-15 03:23:21.161526','2017-11-14 08:40:08.185684',0,'香菜','简介',7.90,'500g','group1/M00/00/00/rBCzg1oKq-iAUG8xAACNpHC0IEY3849954',100,0,1,19,5),(21,'2017-11-15 03:23:46.986158','2017-11-14 08:40:38.330247',0,'冬瓜','简介',12.99,'500g','group1/M00/00/00/rBCzg1oKrAaAN1Z6AAENHrNG1-s8874196',100,0,1,20,5),(22,'2017-11-15 03:24:10.445214','2017-11-14 08:41:19.155821',0,'鱼丸','简介',66.00,'500g','group1/M00/00/00/rBCzg1oKrC-ACdOBAADZQphQJ2o3748807',12,0,1,21,6),(23,'2017-11-15 03:24:37.927158','2017-11-14 08:41:59.658787',0,'蟹棒','简介',68.00,'500g','group1/M00/00/00/rBCzg1oKrFeAJ9PuAABxy5vKkgY2006901',100,0,1,22,6),(24,'2017-11-15 03:25:18.235816','2017-11-14 08:42:25.868409',0,'虾丸','简介',89.99,'500g','group1/M00/00/00/rBCzg1oKrHGADF7jAABICav_wjk1418828',100,0,1,23,6),(25,'2017-11-15 03:25:56.170531','2017-11-14 08:43:18.768380',0,'速冻水饺','简介',20.00,'袋','group1/M00/00/00/rBCzg1oKrKaAFrRTAACMoBJXjDs3577358',100,0,1,24,6),(26,'2017-11-14 08:53:00.188619','2017-11-14 08:53:00.188652',0,'越南芒果','新鲜越南芒果',29.90,'2.5kg','group1/M00/00/00/rBCzg1oKruyABIIzAAByzTJcTjM7085820',100,0,1,25,1),(27,'2017-11-17 07:57:00.677981','2017-11-17 07:57:00.678022',0,'鹌鹑蛋','简介',39.80,'126枚','group1/M00/00/00/rBCzg1oOlkyAHiH3AAGZ6KapWiA5556935',100,0,1,26,4),(28,'2017-11-17 07:58:18.361078','2017-11-17 07:58:18.361122',0,'鹅蛋','简介',49.90,'6枚','group1/M00/00/00/rBCzg1oOlpqAOZ8gAADg_NUp5b47679136',80,0,1,27,4),(29,'2017-11-17 07:59:48.998394','2017-11-17 07:59:48.998431',0,'红辣椒','简介',11.00,'2.5kg','group1/M00/00/00/rBCzg1oOlvWAB6BMAAHXO8pdocY9345486',150,0,1,28,5);\n/*!40000 ALTER TABLE `df_goods_sku` ENABLE KEYS */;\n\n\n/*!40000 ALTER TABLE `df_goods_type` DISABLE KEYS */;\nINSERT INTO `df_goods_type` VALUES (1,'2017-11-14 05:02:09.888544','2017-11-14 05:02:09.888598',0,'新鲜水果','fruit','group1/M00/00/00/rBCzg1oKeNKAEl87AAAmv27pX4k4942898'),(2,'2017-11-14 05:04:32.069517','2017-11-14 05:04:32.069561',0,'海鲜水产','seafood','group1/M00/00/00/rBCzg1oKeWCAOQBsAABHr3RQqFs4497074'),(3,'2017-11-14 05:05:34.514415','2017-11-14 05:05:34.514449',0,'猪牛羊肉','meet','group1/M00/00/00/rBCzg1oKeZ6AA5HjAAAy1Tlm9So7276786'),(4,'2017-11-14 05:05:58.366135','2017-11-14 05:05:58.366170',0,'禽类蛋品','egg','group1/M00/00/00/rBCzg1oKebaAcEWVAAAqR4DoSUg3788077'),(5,'2017-11-14 05:06:32.561861','2017-11-14 05:06:32.561895',0,'新鲜蔬菜','vegetables','group1/M00/00/00/rBCzg1oKediAdUaaAAA-0ZoYkpM9419116'),(6,'2017-11-14 05:06:55.562634','2017-11-14 05:06:55.562673',0,'速冻食品','ice','group1/M00/00/00/rBCzg1oKee-AGMXLAAA3sZPrVzQ0297876');\n/*!40000 ALTER TABLE `df_goods_type` ENABLE KEYS */;\n\n\n\n/*!40000 ALTER TABLE `df_index_banner` DISABLE KEYS */;\nINSERT INTO `df_index_banner` VALUES (1,'2017-11-14 08:48:05.549864','2017-11-14 08:48:05.549896',0,'group1/M00/00/00/rBCzg1oKrcWAX7y-AACpB-LsCdE6038911',0,5),(2,'2017-11-14 08:53:26.498965','2017-11-14 08:53:26.499001',0,'group1/M00/00/00/rBCzg1oKrwaAUerYAAC3B-z8J2c2488703',1,26),(3,'2017-11-14 08:53:40.586457','2017-11-14 08:53:40.586490',0,'group1/M00/00/00/rBCzg1oKrxSAac1BAAETwXb_pso9132934',2,13),(4,'2017-11-14 08:54:02.805958','2017-11-14 08:54:02.805992',0,'group1/M00/00/00/rBCzg1oKryqAPjmzAAD0akkXmFo4923405',3,9);\n/*!40000 ALTER TABLE `df_index_banner` ENABLE KEYS */;\n\n\n/*!40000 ALTER TABLE `df_index_promotion` DISABLE KEYS */;\nINSERT INTO `df_index_promotion` VALUES (1,'2017-11-14 08:56:21.863522','2017-11-17 08:29:08.554743',0,'吃货暑假趴','#','group1/M00/00/00/rBCzg1oKr7aAdR-2AAA2pLUeB609027808',0),(2,'2017-11-14 08:56:53.522161','2017-11-14 08:56:53.522193',0,'盛夏尝鲜季','#','group1/M00/00/00/rBCzg1oKr9WADLksAAA98yvCs1I5148432',1);\n/*!40000 ALTER TABLE `df_index_promotion` ENABLE KEYS */;\n\n\n/*!40000 ALTER TABLE `df_index_type_goods` DISABLE KEYS */;\nINSERT INTO `df_index_type_goods` VALUES (1,'2017-11-14 08:57:41.509910','2017-11-14 08:57:41.509945',0,1,0,1,1),(2,'2017-11-14 08:57:50.129355','2017-11-14 08:57:50.129388',0,1,1,3,1),(3,'2017-11-14 08:58:00.896427','2017-11-14 08:58:00.896459',0,1,2,5,1),(4,'2017-11-14 08:58:20.417072','2017-11-14 08:58:20.417107',0,1,3,4,1),(5,'2017-11-14 08:58:32.934165','2017-11-14 08:58:32.934197',0,0,0,2,1),(6,'2017-11-14 08:58:53.943189','2017-11-14 08:58:53.943227',0,0,1,4,1),(7,'2017-11-14 08:59:16.396829','2017-11-14 08:59:16.396864',0,1,0,6,2),(8,'2017-11-14 08:59:25.723510','2017-11-14 08:59:25.723545',0,1,1,7,2),(9,'2017-11-14 08:59:37.353278','2017-11-14 08:59:37.353315',0,1,2,8,2),(10,'2017-11-14 08:59:48.082119','2017-11-14 09:30:28.117330',0,1,3,9,2),(11,'2017-11-14 08:59:59.725972','2017-11-14 08:59:59.726006',0,0,0,9,2),(12,'2017-11-14 09:00:11.685051','2017-11-14 09:00:11.685098',0,0,1,8,2),(13,'2017-11-14 09:00:20.409490','2017-11-14 09:00:20.409522',0,1,0,10,3),(15,'2017-11-14 09:00:41.325634','2017-11-14 09:00:41.325668',0,1,2,12,3),(16,'2017-11-14 09:00:56.193991','2017-11-14 09:00:56.194023',0,1,3,13,3),(17,'2017-11-14 09:01:09.550978','2017-11-14 09:01:09.551016',0,0,0,15,3),(18,'2017-11-14 09:01:18.798219','2017-11-14 09:01:18.798251',0,1,1,17,3),(19,'2017-11-14 09:01:29.182673','2017-11-14 09:01:29.182705',0,1,0,14,4),(20,'2017-11-14 09:01:44.702111','2017-11-14 09:01:44.702146',0,1,1,16,4),(21,'2017-11-14 09:02:01.490018','2017-11-14 09:02:01.490053',0,0,0,14,4),(22,'2017-11-14 09:02:14.000306','2017-11-14 09:02:14.000344',0,0,1,16,4),(23,'2017-11-14 09:02:29.300733','2017-11-14 09:02:29.300768',0,1,0,18,5),(24,'2017-11-14 09:02:38.655411','2017-11-14 09:02:38.655444',0,1,1,19,5),(25,'2017-11-14 09:02:48.641048','2017-11-14 09:02:48.641080',0,1,2,20,5),(26,'2017-11-14 09:03:01.896718','2017-11-14 09:03:01.896759',0,0,0,20,5),(27,'2017-11-14 09:03:14.583044','2017-11-14 09:03:14.583086',0,0,1,19,5),(28,'2017-11-14 09:03:27.597171','2017-11-14 09:03:27.597206',0,1,0,22,6),(29,'2017-11-14 09:03:37.078417','2017-11-14 09:03:37.078451',0,1,1,23,6),(30,'2017-11-14 09:03:48.459266','2017-11-14 09:03:48.459299',0,1,2,24,6),(31,'2017-11-14 09:03:58.834392','2017-11-14 09:03:58.834428',0,1,3,25,6),(32,'2017-11-14 09:04:11.118584','2017-11-14 09:04:11.118628',0,0,0,23,6),(33,'2017-11-14 09:04:21.235831','2017-11-14 09:04:21.235887',0,0,1,25,6),(34,'2017-11-17 08:00:09.522776','2017-11-17 08:00:09.522811',0,1,2,27,4),(35,'2017-11-17 08:00:19.382093','2017-11-17 08:00:19.382125',0,1,3,28,4),(36,'2017-11-17 08:00:31.352237','2017-11-17 08:00:31.352274',0,1,3,29,5);\n/*!40000 ALTER TABLE `df_index_type_goods` ENABLE KEYS */;\n"
  },
  {
    "path": "dailyfresh/db/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/db/base_model.py",
    "content": "from django.db import models\n\n\nclass BaseModel(models.Model):\n    '''模型抽象基类'''\n    create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')\n    update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')\n    is_delete = models.BooleanField(default=False, verbose_name='删除标记')\n\n    class Meta:\n        # 说明是一个抽象模型类\n        abstract = True"
  },
  {
    "path": "dailyfresh/manage.py",
    "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n    os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"dailyfresh.settings\")\n\n    from django.core.management import execute_from_command_line\n\n    execute_from_command_line(sys.argv)\n"
  },
  {
    "path": "dailyfresh/static/cart(1).html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-购物车</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;购物车</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"total_count\">全部商品<em>2</em>件</div>\t\n\t<ul class=\"cart_list_th clearfix\">\n\t\t<li class=\"col01\">商品名称</li>\n\t\t<li class=\"col02\">商品单位</li>\n\t\t<li class=\"col03\">商品价格</li>\n\t\t<li class=\"col04\">数量</li>\n\t\t<li class=\"col05\">小计</li>\n\t\t<li class=\"col06\">操作</li>\n\t</ul>\n\t<ul class=\"cart_list_td clearfix\">\n\t\t<li class=\"col01\"><input type=\"checkbox\" name=\"\" checked></li>\n\t\t<li class=\"col02\"><img src=\"images/goods/goods012.jpg\"></li>\n\t\t<li class=\"col03\">奇异果<br><em>25.80元/500g</em></li>\n\t\t<li class=\"col04\">500g</li>\n\t\t<li class=\"col05\">25.80元</li>\n\t\t<li class=\"col06\">\n\t\t\t<div class=\"num_add\">\n\t\t\t\t<a href=\"javascript:;\" class=\"add fl\">+</a>\n\t\t\t\t<input type=\"text\" class=\"num_show fl\" value=\"1\">\t\n\t\t\t\t<a href=\"javascript:;\" class=\"minus fl\">-</a>\t\n\t\t\t</div>\n\t\t</li>\n\t\t<li class=\"col07\">25.80元</li>\n\t\t<li class=\"col08\"><a href=\"javascript:;\">删除</a></li>\n\t</ul>\n\n\t<ul class=\"cart_list_td clearfix\">\n\t\t<li class=\"col01\"><input type=\"checkbox\" name=\"\" checked></li>\n\t\t<li class=\"col02\"><img src=\"images/goods/goods003.jpg\"></li>\n\t\t<li class=\"col03\">大兴大棚草莓<br><em>16.80元/500g</em></li>\n\t\t<li class=\"col04\">500g</li>\n\t\t<li class=\"col05\">16.80元</li>\n\t\t<li class=\"col06\">\n\t\t\t<div class=\"num_add\">\n\t\t\t\t<a href=\"javascript:;\" class=\"add fl\">+</a>\n\t\t\t\t<input type=\"text\" class=\"num_show fl\" value=\"1\">\t\n\t\t\t\t<a href=\"javascript:;\" class=\"minus fl\">-</a>\t\n\t\t\t</div>\n\t\t</li>\n\t\t<li class=\"col07\">16.80元</li>\n\t\t<li class=\"col08\"><a href=\"javascript:;\">删除</a></li>\n\t</ul>\n\t\n\n\t<ul class=\"settlements\">\n\t\t<li class=\"col01\"><input type=\"checkbox\" name=\"\" checked=\"\"></li>\n\t\t<li class=\"col02\">全选</li>\n\t\t<li class=\"col03\">合计(不含运费)：<span>¥</span><em>42.60</em><br>共计<b>2</b>件商品</li>\n\t\t<li class=\"col04\"><a href=\"place_order.html\">去结算</a></li>\n\t</ul>\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/css/main.css",
    "content": "body{font-family:'Microsoft Yahei';font-size:12px;color:#666;}\nhtml,body{height:100%}\n/* 顶部样式 */\n.header_con{\n\tbackground-color:#f7f7f7;\n\theight:29px;\n\tborder-bottom:1px solid #dddddd\n}\n\n.header{\n\twidth:1200px;\n\theight:29px;\n\tmargin:0 auto;\n}\n\n.welcome,.login_info,.login_btn,.user_link{\n\tline-height:29px;\n}\n\n.login_info{\n\tdisplay:none;\n}\n\n.login_info em{color:#ff8800}\n\n.login_btn a,.user_link a{\n\tcolor:#666;\n}\n\n.login_btn a:hover,.user_link a:hover{\n\tcolor:#ff8800;\n}\n\n.login_btn span,.user_link span{\n\tcolor:#cecece;\n\tmargin:0 10px;\n}\n\n\n/* logo、搜索框、购物车样式 */\n\n.search_bar{width:1200px;height:115px;margin:0 auto;}\n.logo{width:150px;height:59px;margin:29px 0 0 17px;}\n\n.search_con{width:616px;height:38px;border:1px solid #37ab40;margin:34px 0 0 124px;background:url(../images/icons.png) 10px -338px no-repeat;}\n.search_con .input_text{width:470px;height:34px;border:0px;margin:2px 0 0 36px;outline:none;font-size:12px;color:#737272;font-family:'Microsoft Yahei'}\n\n.search_con .input_btn{\n\twidth:100px;height:38px;background-color:#37ab40;border:0px;font-size:14px;color:#fff;font-family:'Microsoft Yahei';outline:none;cursor:pointer;\n}\n\n.guest_cart{\n\twidth:200px;height:40px;margin-top:34px;\n}\n\n.guest_cart .cart_name{\n\twidth:158px;height:38px;line-height:38px;border:1px solid #dddddd;display:block;background:url(../images/icons.png) 13px -300px no-repeat;font-size:14px;color:#37ab40;text-indent:56px;\n}\n\n.guest_cart .goods_count{\n\twidth:40px;height:40px;text-align:center;line-height:40px;font-size:18px;\n\tfont-weight:bold;color:#fff;background-color:#ff8800;\n}\n\n\n/* 菜单、幻灯片样式 */\n\n.navbar_con{height:40px;border-bottom:2px solid #39a93e}\n.navbar{width:1200px;margin:0 auto;}\n.navbar h1{width:200px;height:40px;line-height:40px;text-align: center;font-size:14px;color:#fff;background-color:#39a93e;}\n\n.navbar .subnav_con{width:200px;height:40px;background-color:#39a93e;position:relative;cursor:pointer;}\n\n.navbar .subnav_con h1{position:absolute;left:0;top:0;text-align:left;text-indent:40px}\n.navbar .subnav_con span{display:block;width:16px;height:9px;background:url(../images/down.png) no-repeat;position:absolute;right:27px;top:16px;transition:all 300ms ease-in;\n}\n\n.navbar .subnav_con:hover span{transform:rotateZ(180deg)}\n\n.navbar .subnav_con .subnav{position:absolute;left:0;top:40px;display:none;border-top:2px solid  #39a93e;}\n.navbar .subnav_con:hover .subnav{display:block;}\n\n\n.navlist{margin-left:34px;}\n.navlist li{height:40px;float:left;line-height:40px;}\n.navlist li a{color:#666;font-size:14px}\n.navlist li a:hover{color:#ff8800}\n.navlist .interval{margin:0 15px;}\n\n\n.center_con{width:1200px;height:270px;margin:0 auto;}\n.subnav{width:198px;height:270px;border-left:1px solid #eee;border-right:1px solid #eee;}\n.subnav li{height:44px;border-bottom:1px solid #eee;background:url(../images/icons.png) 178px -257px no-repeat #fff;}\n\n.subnav li a{display:block;height:44px;line-height:44px;text-indent:71px;font-size:14px;color:#333}\n.subnav li a:hover{color:#ff8800}\n\n.subnav li .fruit{background:url(../images/icons.png) 28px 0px no-repeat;}\n.subnav li .seafood{background:url(../images/icons.png) 28px -43px no-repeat;}\n.subnav li .meet{background:url(../images/icons.png) 28px -86px no-repeat;}\n.subnav li .egg{background:url(../images/icons.png) 28px -132px no-repeat;}\n.subnav li .vegetables{background:url(../images/icons.png) 28px -174px no-repeat;}\n.subnav li .ice{background:url(../images/icons.png) 28px -220px no-repeat;}\n\n\n.slide{width:760px;height:270px;position:relative;overflow:hidden;}\n.slide .slide_pics{position:relative;left:0;top:0;width:760px;height:270px;}\n.slide .slide_pics li{width:760px;height:270px;position:absolute;left:0;top:0}\n.slide .prev,.slide .next{width:17px;height:23px;background:url(../images/icons.png) left -388px no-repeat;position:absolute;left:11px;top:122px;cursor:pointer;}\n.slide .next{background-position:left -428px;left:732px;}\n.points{width:100%;height:11px;position:absolute;left:0;top:250px;text-align:center;}\n.points li{display:inline-block;width:11px;height:11px;margin:0 5px;background-color:#9f9f9f;border-radius:50%;cursor:pointer;}\n.points li.active{background-color:#cecece}\n\n.adv{width:240px;height:270px; overflow:hidden; background-color:gold;}\n.adv a{display:block;float:left;}\n\n\n/* 商品列表样式 */\n\n.list_model{width:1200px;height:340px;margin:15px auto 0;}\n.list_title{height:40px;border-bottom:2px solid #42ad46}\n.list_title h3{height:40px;line-height:40px;font-size:16px;color:#37ab40;font-weight:bold;}\n.list_title .subtitle{height:20px;line-height:20px;margin-top:15px;}\n.list_title .subtitle span{color:#666;margin:0 10px 0 20px;}\n.list_title .subtitle a{color:#666;margin:0 5px;}\n.list_title .subtitle a:hover,.goods_more:hover{color:#ff8800}\n.goods_more{height:20px;margin-top:15px;color:#666}\n\n.goods_con{height:300px;}\n.goods_banner{width:200px;height:300px;}\n.goods_banner img{width:200px;height:300px;}\n\n.goods_list{width:1000px;height:299px;border-bottom:1px solid #ededed}\n.goods_list li{height:299px;width:249px;border-right:1px solid #ededed;float:left}\n.goods_list li:hover{width:248px;height:297px;border:1px solid gold;}\n.goods_list li:hover img{opacity:0.8}\n\n.goods_list li h4{width:200px;height:50px;margin:20px auto 0;text-align:center;}\n.goods_list li h4 a{font-size:14px;color:#666;font-weight:normal;line-height:24px;}\n.goods_list li h4 a:hover{color:#ff8800}\n\n.goods_list li img{display:block;width:180px;height:180px;margin:0 auto;}\n.goods_list li .prize{text-align:center;font-size:20px;color:#c40000;margin-top:5px;}\n\n/* 页面底部样式 */\n.footer{\n\tborder-top:2px solid #42ad46;\n\tmargin:30px 0;\n}\n\n.foot_link{text-align:center;margin-top:30px;}\n.foot_link a,.foot_link span{color:#4e4e4e;}\n.foot_link a:hover{color:#ff8800}\n.foot_link span{padding:0 10px}\n.footer p{text-align:center; margin-top:10px;}\n\n\n/* 二级页面面包屑导航 */\n.breadcrumb{\n\twidth:1200px;height:40px;margin:0 auto;\n}\n.breadcrumb a{line-height:40px;color:#37ab40}\n.breadcrumb a:hover{color:#ff8800}\n.breadcrumb span{line-height:40px;color:#666;padding:0 5px;}\n\n\n.main_wrap{width:1200px;margin:0 auto;}\n.l_wrap{width:200px;}\n.r_wrap{width:980px;}\n\n\n/* 新品推荐样式 */\n\n.new_goods{\n\tborder:1px solid #ededed;\n\tborder-top:2px solid #37ab40;\n\tpadding-bottom:10px;\n}\n\n.new_goods h3{\n\theight:33px;line-height:33px;background-color:#fcfcfc;border-bottom:1px solid #ededed;font-size:14px;font-weight:normal;text-indent:10px;\n}\n\n.new_goods ul{width:160px;margin:0 auto;overflow:hidden;}\n.new_goods li{border-bottom:1px solid #ededed;margin-bottom:-1px;}\n.new_goods li img{display:block;width:150px;height:150px;margin:10px auto;}\n.new_goods li h4{width:160px;margin:0 auto;}\n.new_goods li h4 a{font-weight:normal;color:#666;display:block;width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}\n.new_goods li .prize{font-size:14px;color:#da260e;margin:10px auto;}\n\n\n\n/* 商品列表样式 */\n\n.sort_bar{height:30px;background-color:#f0fdec}\n.sort_bar a{display:block;height:30px;line-height:30px;padding:0 20px;float:left;color:#000}\n.sort_bar .active{background-color:#37ab40;color:#fff;}\n\n\n.goods_type_list{\n\tmargin:10px auto 0;\n}\n\n.goods_type_list li{\n\twidth:196px;\n\tfloat:left;\n\tmargin-bottom:10px\n}\n\n.goods_type_list li img{width:160px;height:160px;display:block;margin:10px auto;}\n.goods_type_list li h4{width:160px;margin:0 auto;}\n.goods_type_list li h4 a{font-weight:normal;color:#666;display:block;width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}\n.operate{width:160px;margin:10px auto;position:relative;}\n.goods_type_list .operate .prize{color:#da260e; font-size:14px;} \n.goods_type_list .operate .unit{color:#999;padding-left:5px;}\n.goods_type_list .operate .add_goods{display:inline-block;width:15px;height:15px;background:url(../images/shop_cart.png);position:absolute;right:0;top:3px;}\n\n\n/* 分页样式 */\n\n.pagenation{height:32px;text-align:center;font-size:0;margin:30px auto;}\n.pagenation a{display:inline-block;border:1px solid #d2d2d2;background-color:#f8f6f7;font-size:12px;padding:7px 10px;color:#666;margin:5px}\n\n.pagenation .active{background-color:#fff;color:#43a200}\n\n\n/* 商品详情样式 */\n.goods_detail_con{\n\twidth:1198px;\n\theight:398px;\n\tborder:1px solid #ededed;\n\tmargin:0 auto 20px;\n}\n\n.goods_detail_pic{width:350px;height:350px;margin:24px 0 0 24px;}\n.goods_detail_list{\n\twidth:730px;height:350px;margin:24px 24px 0 0;\n}\n.goods_detail_list h3{font-size:24px;line-height:24px;color:#666;font-weight:normal;}\n.goods_detail_list p{color:#666;line-height:40px;}\n.prize_bar{height:72px;background-color:#fff5f5;line-height:72px;}\n.prize_bar .show_pirze{font-size:20px;color:#ff3e3e;padding-left:20px}\n.prize_bar .show_pirze em{font-style:normal;font-size:36px;padding-left:10px}\n.prize_bar .show_unit{padding-left:150px}\n\n.goods_num{height:52px;margin-top:19px;}\n.goods_num .num_name{width:70px;height:52px;line-height:52px;}\n.goods_num .num_add{width:75px;height:50px;border:1px solid #dddddd}\n.goods_num .num_add input{width:49px;height:50px;text-align:center;line-height:50px;border:0px;outline:none;font-size:14px;color:#666}\n.goods_num .num_add .add,.goods_num .num_add .minus{width:25px;line-height:25px;text-align:center;border-left:1px solid #ddd;border-bottom:1px solid #ddd;color:#666;font-size:14px}\n.goods_num .num_add .minus{border-bottom:0px}\n\n.total{height:35px;line-height:35px;margin-top:25px;}\n.total em{font-style:normal;color:#ff3e3e;font-size:18px}\n\n.operate_btn{height:40px;margin-top:35px;font-size:0;position:relative;}\n.operate_btn .buy_btn,.operate_btn .add_cart{display:inline-block;width:178px;height:38px;border:1px solid #c40000;font-size:14px;color:#c40000;line-height:38px;text-align:center;background-color:#ffeded;}\n.operate_btn .add_cart{background-color:#c40000;color:#fff;margin-left:10px;position:relative;z-index:10;}\n\n.add_jump{width:20px;height:20px;background-color:#c40000;position:absolute;left:268px;top:10px;border-radius:50%;z-index:9;display:none;}\n\n.detail_tab{\n\theight:35px;\n\tborder-bottom:1px solid #37ab40\n}\n\n.detail_tab li{height:34px;line-height:34px;padding:0 30px;font-size:14px;color:#333333;float:left;border:1px solid #e8e8e8;border-bottom:0px;cursor:pointer;background-color:#faf8f8}\n\n.detail_tab li.active{border-top:2px solid #37ab40;position:relative;background-color:#fff;border-left:1px solid #37ab40;border-right:1px solid #37ab40;top:-1px;height:35px;}\n\n.tab_content dt{margin-top:10px;font-size:16px;color:#044d39}\n.tab_content dd{line-height:24px;margin-top:5px;}\n\n\n/* 登录页 */\n\n.login_top{width:960px;height:130px;margin:0 auto;}\n.login_logo{display:block;width:193px;height:76px;margin-top:30px;}\n.login_form_bg{height:480px;background-color:#518e17}\n.no-mp{margin-top:0px;}\n.login_form_wrap{width:960px;height:480px;margin:0 auto;}\n.login_banner{width:381px;height:322px;background:url(../images/login_banner.png) no-repeat;margin-top:90px;}\n.slogan{width:40px;height:300px;font-size:30px;color:#f0f9e8;text-align:center;line-height:36px;margin:80px 0 0 120px}\n.login_form{width:368px;height:378px;border:1px solid #c6c6c5;background-color:#fff; margin-top:50px;}\n\n.login_title{height:60px;width:308px;margin:10px auto;border-bottom:1px solid #e0e0e0;}\n\n.login_title h1{font-size:24px;height:60px;line-height:60px;color:#a8a8a8;float:left;font-weight:bold;margin-left:44px;}\n.login_title a{width:100px;height:20px;display:block;font-size:16px;color:#5fb42a;text-indent:26px;background:url(../images/icons02.png) left 5px no-repeat;float:left;margin:20px 0 0 36px}\n\n.form_input{width:308px;height:250px;margin:20px auto;position:relative;}\n.name_input,.pass_input{width:306px;height:36px;border:1px solid #e0e0e0;background:url(../images/icons02.png) 280px -41px no-repeat #f8f8f8;outline:none;font-size:14px;text-indent:10px;position: absolute;left:0;top:0}\n.pass_input{top:65px;background-position:280px -95px;}\n\n.user_error,.pwd_error{color:#f00;position:absolute;left:0;top:43px;display:none}\n\n.pwd_error{top:110px;}\n\n.more_input{position:absolute;left:0;top:130px;width:100%}\n\n.more_input input{float:left;margin-top:2px;}\n.more_input label{float:left;margin-left:10px;}\n.more_input a{float:right;color:#666}\n.more_input a:hover{color:#ff8800}\n\n.input_submit{width:100%;height:40px;position:absolute;left:0;top:180px;background-color:#47aa34;color:#fff;font-size:22px;border:0px;font-family:'Microsoft Yahei';cursor:pointer;}\n\n\n/* 注册页面 */\n.register_con{\n\twidth:700px;\n\theight:560px;\n\tmargin:50px auto 0;\n\tbackground:url(../images/interval_line.png) 300px top no-repeat;\n}\n\n.l_con{width:300px;}\n.reg_logo{width:200px;height:76px;float:right;margin-right:30px;}\n.reg_slogan{width:300px;height:30px;float:right;text-align:right;font-size:24px;color:#69a81e;margin:20px 30px 0 0;}\n.reg_banner{width:251px;height:329px;background:url(../images/register_banner.png) no-repeat;float:right; margin:20px 10px 0 0;opacity:0.5}\n\n\n.r_con{width:400px;}\n.reg_title{width:360px;height:50px;float:left;margin-left:30px;border-bottom:1px solid #e0e0e0}\n.reg_title h1{height:50px;line-height:50px;float:left;font-size:24px;color:#a8a8a8;font-weight:bold;}\n.reg_title a{float:right;height:20px;line-height:20px;font-size:16px;color:#5fb42a;padding-right:20px;background:url(../images/icons02.png) 35px 3px no-repeat;margin-top:15px}\n\n.reg_form{width:360px;margin:30px 0 0 30px;float:left;position:relative;}\n.reg_form li{height:70px;}\n.reg_form li label{width:70px;height:40px;line-height:40px;float:left;font-size:14px;color:#a8a8a8}\n.reg_form li input{width:288px;height:38px;border:1px solid #e0e0e0;float:left;outline:none;text-indent:10px;background-color:#f8f8f8}\n.reg_form li.agreement input{width:15px;height:15px;float:left;margin-top:13px}\n.reg_form li.agreement label{width:300px;float:left;margin-left:10px;}\n.reg_form li.reg_sub input{width:360px;height:40px;background-color:#47aa34;font-size:18px;color:#fff;font-family:'Microsoft Yahei';cursor:pointer;}\n.reg_form li .error_tip{float:left;height:30px;line-height:30px;margin-left:70px;color:#e62e2e;display:none;}\n.reg_form li .error_tip2{float:left;height:20px;line-height:20px;color:#e62e2e;display:none;}\n\n\n.sub_page_name{font-size:18px;color:#666;margin:50px 0 0 20px}\n\n.total_count{\n\twidth:1200px;margin:0 auto;height:40px;line-height:40px;font-size:14px;\n}\n.total_count em{\n\tfont-size:16px;color:#ff4200;margin:0 5px;\n}\n\n.cart_list_th{width:1198px;border:1px solid #ddd;background-color:#f7f7f7;margin:0 auto;}\n.cart_list_th li{height:40px;line-height:40px;float:left;text-align:center;}\n.cart_list_th .col01{width:26%;}\n.cart_list_th .col02{width:16%;}\n.cart_list_th .col03{width:13%;}\n.cart_list_th .col04{width:12%;}\n.cart_list_th .col05{width:15%;}\n.cart_list_th .col06{width:18%;}\n\n.cart_list_td{width:1198px;border:1px solid #ddd;background-color:#edfff9;margin:0 auto;margin-top:-1px;}\n.cart_list_td li{height:120px;line-height:120px;float:left;text-align:center;}\n\n.cart_list_td .col01{width:4%;}\n.cart_list_td .col02{width:12%;}\n.cart_list_td .col03{width:10%;}\n.cart_list_td .col04{width:16%;}\n.cart_list_td .col05{width:13%;}\n.cart_list_td .col06{width:12%;}\n.cart_list_td .col07{width:15%;}\n.cart_list_td .col08{width:18%;}\n\n.cart_list_td .col02 img{width:100px;height:100px;border:1px solid #ddd;display:block;margin:10px auto 0;}\n.cart_list_td .col03{height:48px;text-align:left;line-height:24px;margin-top:38px;}\n.cart_list_td .col03 em{color:#999}\n.cart_list_td .col08 a{color:#666}\n\n.cart_list_td .col06 .num_add{width:98px;height:28px;border:1px solid #ddd;margin:40px auto 0;}\n.cart_list_td .col06 .num_add a{width:29px;height:28px;line-height:28px;background-color:#f3f3f3;font-size:14px;color:#666}\n.cart_list_td .col06 .num_add input{width:38px;height:28px;text-align:center;line-height:30px;border:0px;display:block;float:left;outline:none;border-left:1px solid #ddd;border-right:1px solid #ddd;}\n\n\n.settlements{width:1198px;height:78px;border:1px solid #ddd;background-color:#fff4e8;margin:-1px auto 0;}\n.settlements li{line-height:78px;float:left;}\n.settlements .col01{width:4%;text-align:center}\n.settlements .col02{width:12%;}\n.settlements .col03{width:69%; height:48px; line-height:28px;text-align:right;margin-top:10px;}\n.settlements .col03 span{color:#ff0000;padding-right:5px}\n.settlements .col03 em{color:#ff3d3d;font-size:22px;font-weight:bold;}\n.settlements .col03 span{color:#ff0000;}\n.settlements .col03 b{color:#ff0000;font-size:14px;padding:0 5px;}\n\n.settlements .col04{width:14%;text-align:center;float:right;}\n.settlements .col04 a{display:block;height:78px;background-color:#ff3d3d;text-align:center;line-height:78px;color:#fff;font-size:24px}\n\n\n.common_title{width:1200px;margin:20px auto 0;font-size:14px;}\n\n.common_list_con{width:1200px;border:1px solid #dddddd;border-top:2px solid #00bc6f;margin:10px auto 0;background-color:#f7f7f7;position:relative;}\n\n.common_list_con dl{margin:20px;}\n.common_list_con dt{font-size:14px;font-weight:bold;margin-bottom:10px}\n.common_list_con dd input{vertical-align:bottom;margin-right:10px}\n\n.edit_site{position:absolute; right:20px;top:30px;width:100px;height:30px;background-color:#37ab40;text-align:center;line-height:30px;color:#fff}\n\n.pay_style_con{margin:20px;}\n.pay_style_con input{float:left;margin:14px 7px 0 0;}\n.pay_style_con label{float:left;border:1px solid #ccc;background-color:#fff;padding:10px 10px 10px 40px;margin-right:25px}\n\n.pay_style_con .cash{background:url(../images/pay_icons.png) 8px top no-repeat #fff;}\n.pay_style_con .weixin{background:url(../images/pay_icons.png) 6px -36px no-repeat #fff;}\n\n.pay_style_con .zhifubao{background:url(../images/pay_icons.png) 12px -72px no-repeat #fff;width:50px;height:16px}\n\n.pay_style_con .bank{background:url(../images/pay_icons.png) 6px -108px no-repeat #fff;}\n\n\n.goods_list_th{height:40px;border-bottom:1px solid #ccc}\n.goods_list_th li{float:left;line-height:40px;text-align:center;}\n.goods_list_th .col01{width:25%}\n.goods_list_th .col02{width:20%}\n.goods_list_th .col03{width:25%}\n.goods_list_th .col04{width:15%}\n.goods_list_th .col05{width:15%}\n\n.goods_list_td{height:80px;border-bottom:1px solid #eeeded}\n.goods_list_td li{float:left;line-height:80px;text-align:center;}\n.goods_list_td .col01{width:4%}\n.goods_list_td .col02{width:6%}\n.goods_list_td .col03{width:15%}\n.goods_list_td .col04{width:20%}\n.goods_list_td .col05{width:25%}\n.goods_list_td .col06{width:15%}\n.goods_list_td .col07{width:15%}\n\n.goods_list_td .col02{text-align:right}\n.goods_list_td .col02 img{width:63px;height:63px;border:1px solid #ddd;display:block;margin:7px 0;float:right;}\n.goods_list_td .col03{text-align:left;text-indent:20px}\n\n\n.settle_con{margin:10px}\n.total_goods_count,.transit,.total_pay{line-height:24px;text-align:right}\n.total_goods_count em,.total_goods_count b,.transit b,.total_pay b{font-size:14px;color:#ff4200;padding:0 5px;}\n\n.order_submit{width:1200px;margin:20px auto;}\n.order_submit a{width:160px;height:40px;line-height:40px;text-align:center;background-color:#47aa34;color:#fff;font-size:16px;display:block;float:right}\n\n\n.order_list_th{width:1198px;border:1px solid #ddd;background-color:#f7f7f7;margin:20px auto 0;}\n.order_list_th li{float:left;height:30px;line-height:30px}\n.order_list_th .col01{width:20%;margin-left:20px}\n.order_list_th .col02{width:20%}\n\n\n.order_list_table{\n\twidth:1200px;\n\tborder-collapse:collapse;\n\tborder-spacing:0px;\n\tborder:1px solid #ddd;\n\tmargin:-1px auto 0;\n}\n\n.order_list_table td{\n\tborder:1px solid #ddd;\t\n\ttext-align:center;\n}\n\n.order_goods_list{border-bottom:1px solid #ddd;margin-bottom:-2px;}\n.order_goods_list li{float:left; height:80px;line-height:80px;}\n.order_goods_list .col01{width:20%}\n.order_goods_list .col01 img{width:60px;height:60px;border:1px solid #ddd;margin:10px auto;}\n.order_goods_list .col02{width:50%;text-align:left;}\n.order_goods_list .col02 em{color:#999;margin-left:10px}\n.order_goods_list .col03{width:10%}\n.order_goods_list .col04{width:20%}\n\n.oper_btn{display:inline-block;border:1px solid #ddd;color:#666;padding:5px 10px}\n\n.popup_con{display:none;}\n.popup{width:300px;height:150px;border:1px solid #dddddd;border-top:2px solid #00bc6f;background-color:#f7f7f7;position:fixed;\n\tleft:50%;\n\tmargin-left:-150px;\n\ttop:50%;\n\tmargin-top:-75px;\n\tz-index:1000;\n}\n\n.popup p{height:150px;line-height:150px;text-align:center;font-size:18px;}\n\n.mask{width:100%;height:100%;position:fixed;left:0;top:0;background-color:#000;opacity:0.3;z-index:999;}\n\n\n.main_con{\n\twidth:1200px;\n\tmargin:0 auto;\n\tbackground:url(../images/left_bg.jpg) repeat-y;\n}\n\n.left_menu_con{\n\twidth:200px;\n\tfloat:left;\n}\n\n.left_menu_con h3{\n\tfont-size:16px;\n\tline-height:40px;\n\tborder-bottom:1px solid #ddd;\n\ttext-align:center;\n\tmargin-bottom:10px;\n}\n\n.left_menu_con ul li{\n\tline-height:40px;\n\ttext-align:center;\n\tfont-size:14px;\n}\n\n.left_menu_con ul li a{\n\tcolor:#666;\n}\n\n.left_menu_con ul li .active{\n\tcolor:#ff8800;\n\tfont-weight:bold;\n}\n\n.right_content{\n\twidth:980px;\n\tfloat:right;\n\tmin-height:500px;\n}\n\n.w980{\n\twidth:980px;\n}\n\n.w978{\n\twidth:978px;\n}\n\n\n.common_title2{height:20px;line-height:20px;font-size:16px;margin:10px 0;}\n.user_info_list{\n\tbackground-color:#f9f9f9;\n\tmargin:10px 0 15px;\n\tpadding:10px 0;\n\theight:90px;\n}\n\n.user_info_list li{\n\tline-height:30px;\n\ttext-indent:30px;\n\tfont-size:14px;\n}\n\n.user_info_list li span{\n\twidth:100px;\n\tfloat:left;\n\ttext-align:right;\n}\n\n.info_con{\n\twidth:980px;\n}\n\n.info_l{\n\twidth:600px;\n\tfloat:left;\n}\n\n.info_r{\n\twidth:360px;\n\tfloat:right;\n}\n\n.site_con{\n\tbackground-color:#f9f9f9;\n\tpadding:10px 0;\n\tmargin-bottom:20px;\n}\n\n.site_con dt{\n\tfont-size:14px;\n\tline-height:30px;\n\ttext-indent:30px;\n\tfont-weight:bold;\n}\n\n.site_con dd{\n\tfont-size:14px;\n\tline-height:30px;\n\ttext-indent:30px;\n}\n\n.site_con .form_group{\n\theight:40px;\n\tline-height:40px;\n\tmargin-top:10px;\n}\n\n.site_con .form_group label{\n\twidth:100px;\n\tfloat:left;\n\ttext-align:right;\n\tfont-size:14px;\n\theight:40px;\n\tline-height:40px;\n}\n\n.site_con .form_group input{\n\twidth:300px;\n\theight:25px;\n\tborder:1px solid #ddd;\n\tfloat:left;\n\toutline:none;\n\tmargin-top:7px;\n\ttext-indent:10px;\n}\n\n.site_con .form_group2{\n\theight:90px;\n}\n\n.site_area{\n\twidth:280px;\n\theight:60px;\n\tborder:1px solid #ddd;\n\toutline:none;\n\tpadding:10px;\n}\n.info_submit{\n\twidth:80px;\n\theight:30px;\n\tbackground-color:#37ab40;\n\tborder:0px;\n\tcolor:#fff;\n\tmargin:10px 0 10px 100px;\n\tcursor:pointer;\n\tfont-family:'Microsoft Yahei'\n}\n\n.info_address{\n\twidth:80px;\n\theight:30px;\n\tbackground-color:#37ab40;\n\tborder:0px;\n\tcolor:#fff;\n\tmargin:10px 0 10px 30px;\n\tcursor:pointer;\n\tfont-family:'Microsoft Yahei'\n}\n\n.stress{\n\tcolor:#ff8800;\n}"
  },
  {
    "path": "dailyfresh/static/css/reset.css",
    "content": "/* 把标签默认的间距设为0 */\nbody,ul,ol,p,h1,h2,h3,h4,h5,h6,dl,dd,select,input,textarea,form{margin:0;padding:0}\n\n/* 让h标签文字大小继承body的文字设置 */\nh1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}\n\n/* 去掉列表默认的图标 */\nul,ol{list-style:none;}\n\n/* 去掉em默认的斜体 */\nem{font-style: normal;}\n\n/* 去掉a标签默认的下划线 */\na{text-decoration:none;}\n\n\n/* 去掉加链接时产生的框线 */\nimg{border:0;}\n\n/* 清除浮动 */\n.clearfix:before,.clearfix:after{content:\"\";display:table}\n.clearfix:after{clear:both;}\n.clearfix{zoom:1}\n\n/* 浮动 */\n.fl{float:left}\n.fr{float:right}"
  },
  {
    "path": "dailyfresh/static/detail.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-商品详情</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"search_con fl\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\n\t\t<div class=\"guest_cart fr\">\n\t\t\t<a href=\"cart.html\" class=\"cart_name fl\">我的购物车</a>\n\t\t\t<div class=\"goods_count fl\" id=\"show_count\">1</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar clearfix\">\n\t\t\t<div class=\"subnav_con fl\">\n\t\t\t\t<h1>全部商品分类</h1>\t\n\t\t\t\t<span></span>\t\t\t\n\t\t\t\t<ul class=\"subnav\">\n\t\t\t\t\t<li><a href=\"#\" class=\"fruit\">新鲜水果</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"seafood\">海鲜水产</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"meet\">猪牛羊肉</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"egg\">禽类蛋品</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vegetables\">新鲜蔬菜</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"ice\">速冻食品</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\n\t<div class=\"breadcrumb\">\n\t\t<a href=\"#\">全部分类</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">新鲜水果</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">商品详情</a>\n\t</div>\n\n\t<div class=\"goods_detail_con clearfix\">\n\t\t<div class=\"goods_detail_pic fl\"><img src=\"images/goods_detail.jpg\"></div>\n\n\t\t<div class=\"goods_detail_list fr\">\n\t\t\t<h3>大兴大棚草莓</h3>\n\t\t\t<p>草莓浆果柔软多汁，味美爽口，适合速冻保鲜贮藏。草莓速冻后，可以保持原有的色、香、味，既便于贮藏，又便于外销。</p>\n\t\t\t<div class=\"prize_bar\">\n\t\t\t\t<span class=\"show_pirze\">¥<em>16.80</em></span>\n\t\t\t\t<span class=\"show_unit\">单  位：500g</span>\n\t\t\t</div>\n\t\t\t<div class=\"goods_num clearfix\">\n\t\t\t\t<div class=\"num_name fl\">数 量：</div>\n\t\t\t\t<div class=\"num_add fl\">\n\t\t\t\t\t<input type=\"text\" class=\"num_show fl\" value=\"1\">\n\t\t\t\t\t<a href=\"javascript:;\" class=\"add fr\">+</a>\n\t\t\t\t\t<a href=\"javascript:;\" class=\"minus fr\">-</a>\t\n\t\t\t\t</div> \n\t\t\t</div>\n\t\t\t<div class=\"total\">总价：<em>16.80元</em></div>\n\t\t\t<div class=\"operate_btn\">\n\t\t\t\t<a href=\"javascript:;\" class=\"buy_btn\">立即购买</a>\n\t\t\t\t<a href=\"javascript:;\" class=\"add_cart\" id=\"add_cart\">加入购物车</a>\t\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"main_wrap clearfix\">\n\t\t<div class=\"l_wrap fl clearfix\">\n\t\t\t<div class=\"new_goods\">\n\t\t\t\t<h3>新品推荐</h3>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods001.jpg\"></a>\n\t\t\t\t\t\t<h4><a href=\"#\">进口柠檬</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥3.90</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods002.jpg\"></a>\n\t\t\t\t\t\t<h4><a href=\"#\">玫瑰香葡萄</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥16.80</div>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"r_wrap fr clearfix\">\n\t\t\t<ul class=\"detail_tab clearfix\">\n\t\t\t\t<li class=\"active\">商品介绍</li>\n\t\t\t\t<li>评论</li>\n\t\t\t</ul>\n\n\t\t\t<div class=\"tab_content\">\n\t\t\t\t<dl>\n\t\t\t\t\t<dt>商品详情：</dt>\n\t\t\t\t\t<dd>草莓采摘园位于北京大兴区 庞各庄镇四各庄村 ，每年1月-6月面向北京以及周围城市提供新鲜草莓采摘和精品礼盒装草莓，草莓品种多样丰富，个大香甜。所有草莓均严格按照有机标准培育，不使用任何化肥和农药。草莓在采摘期间免洗可以直接食用。欢迎喜欢草莓的市民前来采摘，也欢迎各大单位选购精品有机草莓礼盒，有机草莓礼盒是亲朋馈赠、福利送礼的最佳选择。 </dd>\n\t\t\t\t</dl>\n\t\t\t</div>\n\n\t\t</div>\n\t</div>\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t<div class=\"add_jump\"></div>\n\n\t<script type=\"text/javascript\" src=\"js/jquery-1.12.2.js\"></script>\n\t<script type=\"text/javascript\">\n\t\tvar $add_x = $('#add_cart').offset().top;\n\t\tvar $add_y = $('#add_cart').offset().left;\n\n\t\tvar $to_x = $('#show_count').offset().top;\n\t\tvar $to_y = $('#show_count').offset().left;\n\n\t\t$(\".add_jump\").css({'left':$add_y+80,'top':$add_x+10,'display':'block'})\n\t\t$('#add_cart').click(function(){\n\t\t\t$(\".add_jump\").stop().animate({\n\t\t\t\t'left': $to_y+7,\n\t\t\t\t'top': $to_x+7},\n\t\t\t\t\"fast\", function() {\n\t\t\t\t\t$(\".add_jump\").fadeOut('fast',function(){\n\t\t\t\t\t\t$('#show_count').html(2);\n\t\t\t\t\t});\n\n\t\t\t});\n\t\t})\n\t</script>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/index.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n    \n\t<title>天天生鲜-首页</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/css/main.css\">\n\t\n    \n\t<script type=\"text/javascript\" src=\"/static/js/jquery-1.12.4.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"/static/js/jquery-ui.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"/static/js/slide.js\"></script>\n\n</head>\n<body>\n\n\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"/user/login\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"/user/register\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"/user/\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"/user/order\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\n\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"/static/images/logo.png\"></a>\n\t\t<div class=\"search_con fl\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\n\t\t<div class=\"guest_cart fr\">\n\t\t\t<a href=\"#\" class=\"cart_name fl\">我的购物车</a>\n\t\t\t<div class=\"goods_count fl\" id=\"show_count\"></div>\n\t\t</div>\n\t</div>\n\n\n\n\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar\">\n\t\t\t<h1 class=\"fl\">全部商品分类</h1>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\n\t<div class=\"center_con clearfix\">\n\t\t<ul class=\"subnav fl\">\n            \n\t\t</ul>\n\t\t<div class=\"slide fl\">\n\t\t\t<ul class=\"slide_pics\">\n                \n\t\t\t</ul>\n\t\t\t<div class=\"prev\"></div>\n\t\t\t<div class=\"next\"></div>\n\t\t\t<ul class=\"points\"></ul>\n\t\t</div>\n\t\t<div class=\"adv fl\">\n            \n\t\t</div>\n\t</div>\n\n    \n\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n    \n    \n    \n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/js/jquery.cookie.js",
    "content": "/*!\n * jQuery Cookie Plugin v1.4.1\n * https://github.com/carhartl/jquery-cookie\n *\n * Copyright 2013 Klaus Hartl\n * Released under the MIT license\n */\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD\n\t\tdefine(['jquery'], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// CommonJS\n\t\tfactory(require('jquery'));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n}(function ($) {\n\n\tvar pluses = /\\+/g;\n\n\tfunction encode(s) {\n\t\treturn config.raw ? s : encodeURIComponent(s);\n\t}\n\n\tfunction decode(s) {\n\t\treturn config.raw ? s : decodeURIComponent(s);\n\t}\n\n\tfunction stringifyCookieValue(value) {\n\t\treturn encode(config.json ? JSON.stringify(value) : String(value));\n\t}\n\n\tfunction parseCookieValue(s) {\n\t\tif (s.indexOf('\"') === 0) {\n\t\t\t// This is a quoted cookie as according to RFC2068, unescape...\n\t\t\ts = s.slice(1, -1).replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, '\\\\');\n\t\t}\n\n\t\ttry {\n\t\t\t// Replace server-side written pluses with spaces.\n\t\t\t// If we can't decode the cookie, ignore it, it's unusable.\n\t\t\t// If we can't parse the cookie, ignore it, it's unusable.\n\t\t\ts = decodeURIComponent(s.replace(pluses, ' '));\n\t\t\treturn config.json ? JSON.parse(s) : s;\n\t\t} catch(e) {}\n\t}\n\n\tfunction read(s, converter) {\n\t\tvar value = config.raw ? s : parseCookieValue(s);\n\t\treturn $.isFunction(converter) ? converter(value) : value;\n\t}\n\n\tvar config = $.cookie = function (key, value, options) {\n\n\t\t// Write\n\n\t\tif (value !== undefined && !$.isFunction(value)) {\n\t\t\toptions = $.extend({}, config.defaults, options);\n\n\t\t\tif (typeof options.expires === 'number') {\n\t\t\t\tvar days = options.expires, t = options.expires = new Date();\n\t\t\t\tt.setTime(+t + days * 864e+5);\n\t\t\t}\n\n\t\t\treturn (document.cookie = [\n\t\t\t\tencode(key), '=', stringifyCookieValue(value),\n\t\t\t\toptions.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE\n\t\t\t\toptions.path    ? '; path=' + options.path : '',\n\t\t\t\toptions.domain  ? '; domain=' + options.domain : '',\n\t\t\t\toptions.secure  ? '; secure' : ''\n\t\t\t].join(''));\n\t\t}\n\n\t\t// Read\n\n\t\tvar result = key ? undefined : {};\n\n\t\t// To prevent the for loop in the first place assign an empty array\n\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t// calling $.cookie().\n\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\n\t\tfor (var i = 0, l = cookies.length; i < l; i++) {\n\t\t\tvar parts = cookies[i].split('=');\n\t\t\tvar name = decode(parts.shift());\n\t\t\tvar cookie = parts.join('=');\n\n\t\t\tif (key && key === name) {\n\t\t\t\t// If second argument (value) is a function it's a converter...\n\t\t\t\tresult = read(cookie, value);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Prevent storing a cookie that we couldn't decode.\n\t\t\tif (!key && (cookie = read(cookie)) !== undefined) {\n\t\t\t\tresult[name] = cookie;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconfig.defaults = {};\n\n\t$.removeCookie = function (key, options) {\n\t\tif ($.cookie(key) === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Must not alter options, thus extending a fresh object...\n\t\t$.cookie(key, '', $.extend({}, options, { expires: -1 }));\n\t\treturn !$.cookie(key);\n\t};\n\n}));\n"
  },
  {
    "path": "dailyfresh/static/js/register.js",
    "content": "$(function(){\n\n\tvar error_name = false;\n\tvar error_password = false;\n\tvar error_check_password = false;\n\tvar error_email = false;\n\tvar error_check = false;\n\n\n\t$('#user_name').blur(function() {\n\t\tcheck_user_name();\n\t});\n\n\t$('#pwd').blur(function() {\n\t\tcheck_pwd();\n\t});\n\n\t$('#cpwd').blur(function() {\n\t\tcheck_cpwd();\n\t});\n\n\t$('#email').blur(function() {\n\t\tcheck_email();\n\t});\n\n\t$('#allow').click(function() {\n\t\tif($(this).is(':checked'))\n\t\t{\n\t\t\terror_check = false;\n\t\t\t$(this).siblings('span').hide();\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror_check = true;\n\t\t\t$(this).siblings('span').html('请勾选同意');\n\t\t\t$(this).siblings('span').show();\n\t\t}\n\t});\n\n\n\tfunction check_user_name(){\n\t\tvar len = $('#user_name').val().length;\n\t\tif(len<5||len>20)\n\t\t{\n\t\t\t$('#user_name').next().html('请输入5-20个字符的用户名')\n\t\t\t$('#user_name').next().show();\n\t\t\terror_name = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#user_name').next().hide();\n\t\t\terror_name = false;\n\t\t}\n\t}\n\n\tfunction check_pwd(){\n\t\tvar len = $('#pwd').val().length;\n\t\tif(len<8||len>20)\n\t\t{\n\t\t\t$('#pwd').next().html('密码最少8位，最长20位')\n\t\t\t$('#pwd').next().show();\n\t\t\terror_password = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#pwd').next().hide();\n\t\t\terror_password = false;\n\t\t}\t\t\n\t}\n\n\n\tfunction check_cpwd(){\n\t\tvar pass = $('#pwd').val();\n\t\tvar cpass = $('#cpwd').val();\n\n\t\tif(pass!=cpass)\n\t\t{\n\t\t\t$('#cpwd').next().html('两次输入的密码不一致')\n\t\t\t$('#cpwd').next().show();\n\t\t\terror_check_password = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#cpwd').next().hide();\n\t\t\terror_check_password = false;\n\t\t}\t\t\n\t\t\n\t}\n\n\tfunction check_email(){\n\t\tvar re = /^[a-z0-9][\\w\\.\\-]*@[a-z0-9\\-]+(\\.[a-z]{2,5}){1,2}$/;\n\n\t\tif(re.test($('#email').val()))\n\t\t{\n\t\t\t$('#email').next().hide();\n\t\t\terror_email = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#email').next().html('你输入的邮箱格式不正确')\n\t\t\t$('#email').next().show();\n\t\t\terror_check_password = true;\n\t\t}\n\n\t}\n\n\n\t$('#reg_form').submit(function() {\n\t\tcheck_user_name();\n\t\tcheck_pwd();\n\t\tcheck_cpwd();\n\t\tcheck_email();\n\n\t\tif(error_name == false && error_password == false && error_check_password == false && error_email == false && error_check == false)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t});\n\n\n\n\n\n\n\n\n})"
  },
  {
    "path": "dailyfresh/static/js/slide.js",
    "content": "$(function(){\n\tvar $slides = $('.slide_pics li');\n\tvar len = $slides.length;\n\tvar nowli = 0;\n\tvar prevli = 0;\n\tvar $prev = $('.prev');\n\tvar $next = $('.next');\n\tvar ismove = false;\n\tvar timer = null;\n\t$slides.not(':first').css({left:760});\n\t$slides.each(function(index, el) {\n\t\tvar $li = $('<li>');\n\n\t\tif(index==0)\n\t\t{\n\t\t\t$li.addClass('active');\n\t\t}\n\n\t\t$li.appendTo($('.points'));\n\t});\n\t$points = $('.points li');\n\ttimer = setInterval(autoplay,4000);\n\n\t$('.slide').mouseenter(function() {\n\t\tclearInterval(timer);\n\t});\n\n\t$('.slide').mouseleave(function() {\n\t\ttimer = setInterval(autoplay,4000);\n\t});\n\n\tfunction autoplay(){\n\t\tnowli++;\n\t\tmove();\n\t\t$points.eq(nowli).addClass('active').siblings().removeClass('active');\n\t}\n\n\t$points.click(function(event) {\n\t\tif(ismove)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tnowli = $(this).index();\n\n\t\tif(nowli==prevli)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$(this).addClass('active').siblings().removeClass('active');\n\t\tmove();\n\n\t});\n\n\t$prev.click(function() {\n\t\tif(ismove)\n\t\t{\n\t\t\treturn;\n\t\t}\t\t\n\t\tnowli--;\n\t\tmove();\n\t\t$points.eq(nowli).addClass('active').siblings().removeClass('active');\n\n\t});\n\t\n\t$next.click(function() {\n\t\tif(ismove)\n\t\t{\n\t\t\treturn;\n\t\t}\t\t\n\t\tnowli++;\n\t\tmove();\n\t\t$points.eq(nowli).addClass('active').siblings().removeClass('active');\n\n\t});\n\n\n\tfunction move(){\n\n\t\tismove = true;\n\n\t\tif(nowli<0)\n\t\t{\n\t\t\tnowli=len-1;\n\t\t\tprevli = 0\n\t\t\t$slides.eq(nowli).css({left:-760});\n\t\t\t$slides.eq(nowli).animate({left:0},800,'easeOutExpo');\n\t\t\t$slides.eq(prevli).animate({left:760},800,'easeOutExpo',function(){\n\t\t\t\tismove = false;\n\t\t\t});\n\t\t\tprevli=nowli;\n\t\t\treturn;\n\t\t}\n\n\t\tif(nowli>len-1)\n\t\t{\n\t\t\tnowli = 0;\n\t\t\tprevli = len-1;\n\t\t\t$slides.eq(nowli).css({left:760});\n\t\t\t$slides.eq(nowli).animate({left:0},800,'easeOutExpo');\n\t\t\t$slides.eq(prevli).animate({left:-760},800,'easeOutExpo',function(){\n\t\t\t\tismove = false;\n\t\t\t});\n\t\t\tprevli=nowli;\n\t\t\treturn;\n\t\t}\n\n\n\t\tif(prevli<nowli)\n\t\t{\n\t\t\t$slides.eq(nowli).css({left:760});\t\t\t\n\t\t\t$slides.eq(prevli).animate({left:-760},800,'easeOutExpo');\n\t\t\t$slides.eq(nowli).animate({left:0},800,'easeOutExpo',function(){\n\t\t\t\tismove = false;\n\t\t\t});\n\t\t\tprevli=nowli;\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\t$slides.eq(nowli).css({left:-760});\t\t\t\n\t\t\t$slides.eq(prevli).animate({left:760},800,'easeOutExpo');\t\n\t\t\t$slides.eq(nowli).animate({left:0},800,'easeOutExpo',function(){\n\t\t\t\tismove = false;\n\t\t\t});\n\t\t\tprevli=nowli;\t\t\n\t\t}\n\n\t}\n})"
  },
  {
    "path": "dailyfresh/static/list.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-商品列表</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"search_con fl\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\n\t\t<div class=\"guest_cart fr\">\n\t\t\t<a href=\"#\" class=\"cart_name fl\">我的购物车</a>\n\t\t\t<div class=\"goods_count fl\">1</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar clearfix\">\n\t\t\t<div class=\"subnav_con fl\">\n\t\t\t\t<h1>全部商品分类</h1>\t\n\t\t\t\t<span></span>\t\t\t\n\t\t\t\t<ul class=\"subnav\">\n\t\t\t\t\t<li><a href=\"#\" class=\"fruit\">新鲜水果</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"seafood\">海鲜水产</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"meet\">猪牛羊肉</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"egg\">禽类蛋品</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vegetables\">新鲜蔬菜</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"ice\">速冻食品</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\n\t<div class=\"breadcrumb\">\n\t\t<a href=\"#\">全部分类</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">新鲜水果</a>\n\t</div>\n\n\t<div class=\"main_wrap clearfix\">\n\t\t<div class=\"l_wrap fl clearfix\">\n\t\t\t<div class=\"new_goods\">\n\t\t\t\t<h3>新品推荐</h3>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods001.jpg\"></a>\n\t\t\t\t\t\t<h4><a href=\"#\">进口柠檬</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥3.90</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods002.jpg\"></a>\n\t\t\t\t\t\t<h4><a href=\"#\">玫瑰香葡萄</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥16.80</div>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"r_wrap fr clearfix\">\n\t\t\t<div class=\"sort_bar\">\n\t\t\t\t<a href=\"#\" class=\"active\">默认</a>\n\t\t\t\t<a href=\"#\">价格</a>\n\t\t\t\t<a href=\"#\">人气</a>\n\t\t\t</div>\n\n\t\t\t<ul class=\"goods_type_list clearfix\">\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"detail.html\"><img src=\"images/goods/goods003.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"detail.html\">大兴大棚草莓</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥16.80</span>\n\t\t\t\t\t\t<span class=\"unit\">16.80/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods004.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">吐鲁番梨光杏</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥5.50</span>\n\t\t\t\t\t\t<span class=\"unit\">5.50/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods005.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">黄肉桃</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥10.00</span>\n\t\t\t\t\t\t<span class=\"unit\">10.00/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods006.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">进口西梅</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥28.80</span>\n\t\t\t\t\t\t<span class=\"unit\">28.8/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods007.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">香梨</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥6.45</span>\n\t\t\t\t\t\t<span class=\"unit\">6.45/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods008.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">栗子</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥9.50</span>\n\t\t\t\t\t\t<span class=\"unit\">9.50/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods009.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">海南香蕉</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥3.30</span>\n\t\t\t\t\t\t<span class=\"unit\">3.30/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods010.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">青苹果</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥5.00</span>\n\t\t\t\t\t\t<span class=\"unit\">5.00/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods011.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">山莓</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥28.80</span>\n\t\t\t\t\t\t<span class=\"unit\">28.8/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods012.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">奇异果</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥25.80</span>\n\t\t\t\t\t\t<span class=\"unit\">25.8/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods013.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">蜜桔</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥4.80</span>\n\t\t\t\t\t\t<span class=\"unit\">4.8/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods014.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">脐橙</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥3.50</span>\n\t\t\t\t\t\t<span class=\"unit\">3.50/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods001.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">进口柠檬</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥3.90</span>\n\t\t\t\t\t\t<span class=\"unit\">3.90/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods002.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">玫瑰香葡萄</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥16.80</span>\n\t\t\t\t\t\t<span class=\"unit\">16.80/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\n\t\t\t<div class=\"pagenation\">\n\t\t\t\t<a href=\"#\"><上一页</a>\n\t\t\t\t<a href=\"#\" class=\"active\">1</a>\n\t\t\t\t<a href=\"#\">2</a>\n\t\t\t\t<a href=\"#\">3</a>\n\t\t\t\t<a href=\"#\">4</a>\n\t\t\t\t<a href=\"#\">5</a>\n\t\t\t\t<a href=\"#\">下一页></a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/login.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-登录</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"login_top clearfix\">\n\t\t<a href=\"index.html\" class=\"login_logo\"><img src=\"images/logo02.png\"></a>\t\n\t</div>\n\n\t<div class=\"login_form_bg\">\n\t\t<div class=\"login_form_wrap clearfix\">\n\t\t\t<div class=\"login_banner fl\"></div>\n\t\t\t<div class=\"slogan fl\">日夜兼程 · 急速送达</div>\n\t\t\t<div class=\"login_form fr\">\n\t\t\t\t<div class=\"login_title clearfix\">\n\t\t\t\t\t<h1>用户登录</h1>\n\t\t\t\t\t<a href=\"#\">立即注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form_input\">\n\t\t\t\t\t<form>\n\t\t\t\t\t\t<input type=\"text\" name=\"username\" class=\"name_input\" placeholder=\"请输入用户名\">\n\t\t\t\t\t\t<div class=\"user_error\">输入错误</div>\n\t\t\t\t\t\t<input type=\"password\" name=\"pwd\" class=\"pass_input\" placeholder=\"请输入密码\">\n\t\t\t\t\t\t<div class=\"pwd_error\">输入错误</div>\n\t\t\t\t\t\t<div class=\"more_input clearfix\">\n\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"\">\n\t\t\t\t\t\t\t<label>记住用户名</label>\n\t\t\t\t\t\t\t<a href=\"#\">忘记密码</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type=\"submit\" name=\"\" value=\"登录\" class=\"input_submit\">\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"footer no-mp\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/place_order.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-提交订单</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;提交订单</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\t\t\n\t</div>\n\t\n\t<h3 class=\"common_title\">确认收货地址</h3>\n\n\t<div class=\"common_list_con clearfix\">\n\t\t<dl>\n\t\t\t<dt>寄送到：</dt>\n\t\t\t<dd><input type=\"radio\" name=\"\" checked=\"\">北京市 海淀区 东北旺西路8号中关村软件园 （李思 收） 182****7528</dd>\n\t\t</dl>\n\t\t<a href=\"user_center_site.html\" class=\"edit_site\">编辑收货地址</a>\n\n\t</div>\n\t\n\t<h3 class=\"common_title\">支付方式</h3>\t\n\t<div class=\"common_list_con clearfix\">\n\t\t<div class=\"pay_style_con clearfix\">\n\t\t\t<input type=\"radio\" name=\"pay_style\" checked>\n\t\t\t<label class=\"cash\">货到付款</label>\n\t\t\t<input type=\"radio\" name=\"pay_style\">\n\t\t\t<label class=\"weixin\">微信支付</label>\n\t\t\t<input type=\"radio\" name=\"pay_style\">\n\t\t\t<label class=\"zhifubao\"></label>\n\t\t\t<input type=\"radio\" name=\"pay_style\">\n\t\t\t<label class=\"bank\">银行卡支付</label>\n\t\t</div>\n\t</div>\n\n\t<h3 class=\"common_title\">商品列表</h3>\n\t\n\t<div class=\"common_list_con clearfix\">\n\t\t<ul class=\"goods_list_th clearfix\">\n\t\t\t<li class=\"col01\">商品名称</li>\n\t\t\t<li class=\"col02\">商品单位</li>\n\t\t\t<li class=\"col03\">商品价格</li>\n\t\t\t<li class=\"col04\">数量</li>\n\t\t\t<li class=\"col05\">小计</li>\t\t\n\t\t</ul>\n\t\t<ul class=\"goods_list_td clearfix\">\n\t\t\t<li class=\"col01\">1</li>\t\t\t\n\t\t\t<li class=\"col02\"><img src=\"images/goods/goods012.jpg\"></li>\n\t\t\t<li class=\"col03\">奇异果</li>\n\t\t\t<li class=\"col04\">500g</li>\n\t\t\t<li class=\"col05\">25.80元</li>\n\t\t\t<li class=\"col06\">1</li>\n\t\t\t<li class=\"col07\">25.80元</li>\t\n\t\t</ul>\n\t\t<ul class=\"goods_list_td clearfix\">\n\t\t\t<li class=\"col01\">2</li>\t\t\t\n\t\t\t<li class=\"col02\"><img src=\"images/goods/goods003.jpg\"></li>\n\t\t\t<li class=\"col03\">大兴大棚草莓</li>\n\t\t\t<li class=\"col04\">500g</li>\n\t\t\t<li class=\"col05\">16.80元</li>\n\t\t\t<li class=\"col06\">1</li>\n\t\t\t<li class=\"col07\">16.80元</li>\t\n\t\t</ul>\n\t</div>\n\n\t<h3 class=\"common_title\">总金额结算</h3>\n\n\t<div class=\"common_list_con clearfix\">\n\t\t<div class=\"settle_con\">\n\t\t\t<div class=\"total_goods_count\">共<em>2</em>件商品，总金额<b>42.60元</b></div>\n\t\t\t<div class=\"transit\">运费：<b>10元</b></div>\n\t\t\t<div class=\"total_pay\">实付款：<b>52.60元</b></div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"order_submit clearfix\">\n\t\t<a href=\"javascript:;\" id=\"order_btn\">提交订单</a>\n\t</div>\t\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\n\t<div class=\"popup_con\">\n\t\t<div class=\"popup\">\n\t\t\t<p>订单提交成功！</p>\n\t\t</div>\n\t\t\n\t\t<div class=\"mask\"></div>\n\t</div>\n\t<script type=\"text/javascript\" src=\"js/jquery-1.12.2.js\"></script>\n\t<script type=\"text/javascript\">\n\t\t$('#order_btn').click(function() {\n\t\t\tlocalStorage.setItem('order_finish',2);\n\n\t\t\t$('.popup_con').fadeIn('fast', function() {\n\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t$('.popup_con').fadeOut('fast',function(){\n\t\t\t\t\t\twindow.location.href = 'index.html';\n\t\t\t\t\t});\t\n\t\t\t\t},3000)\n\t\t\t\t\n\t\t\t});\n\t\t});\n\t</script>\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/register.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-注册</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n\t<script type=\"text/javascript\" src=\"js/jquery-1.12.4.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"js/register.js\"></script>\n</head>\n<body>\n\t<div class=\"register_con\">\n\t\t<div class=\"l_con fl\">\n\t\t\t<a class=\"reg_logo\"><img src=\"images/logo02.png\"></a>\n\t\t\t<div class=\"reg_slogan\">足不出户  ·  新鲜每一天</div>\n\t\t\t<div class=\"reg_banner\"></div>\n\t\t</div>\n\n\t\t<div class=\"r_con fr\">\n\t\t\t<div class=\"reg_title clearfix\">\n\t\t\t\t<h1>用户注册</h1>\n\t\t\t\t<a href=\"#\">登录</a>\n\t\t\t</div>\n\t\t\t<div class=\"reg_form clearfix\">\n\t\t\t\t<form>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>用户名:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"user_name\" id=\"user_name\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\t\t\t\t\t\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>密码:</label>\n\t\t\t\t\t\t<input type=\"password\" name=\"pwd\" id=\"pwd\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>确认密码:</label>\n\t\t\t\t\t\t<input type=\"password\" name=\"cpwd\" id=\"cpwd\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>邮箱:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"email\" id=\"email\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"agreement\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"allow\" id=\"allow\" checked=\"checked\">\n\t\t\t\t\t\t<label>同意”天天生鲜用户使用协议“</label>\n\t\t\t\t\t\t<span class=\"error_tip2\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"reg_sub\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"注 册\" name=\"\">\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\t\t\t\t\n\t\t\t\t</form>\n\t\t\t</div>\n\n\t\t</div>\n\n\t</div>\n\n\t<div class=\"footer no-mp\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/test.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Title</title>\n</head>\n<body>\n<img src=\"http://127.0.0.1:8888/group1/M00/00/00/wKgfWVznv-iAH8rAAACG07GLXPk205.jpg\">\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/user_center_info.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-用户中心</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"main_con clearfix\">\n\t\t<div class=\"left_menu_con clearfix\">\n\t\t\t<h3>用户中心</h3>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"user_center_info.html\" class=\"active\">· 个人信息</a></li>\n\t\t\t\t<li><a href=\"user_center_order.html\">· 全部订单</a></li>\n\t\t\t\t<li><a href=\"user_center_site.html\">· 收货地址</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"right_content clearfix\">\n\t\t\t\t<div class=\"info_con clearfix\">\n\t\t\t\t<h3 class=\"common_title2\">基本信息</h3>\n\t\t\t\t\t\t<ul class=\"user_info_list\">\n\t\t\t\t\t\t\t<li><span>用户名：</span>18210569700</li>\n\t\t\t\t\t\t\t<li><span>联系方式：</span>18210569700</li>\n\t\t\t\t\t\t\t<li><span>联系地址：</span>北京市昌平区</li>\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<h3 class=\"common_title2\">最近浏览</h3>\n\t\t\t\t<div class=\"has_view_list\">\n\t\t\t\t\t<ul class=\"goods_type_list clearfix\">\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"detail.html\"><img src=\"images/goods/goods003.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"detail.html\">大兴大棚草莓</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥16.80</span>\n\t\t\t\t\t\t<span class=\"unit\">16.80/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods004.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">吐鲁番梨光杏</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥5.50</span>\n\t\t\t\t\t\t<span class=\"unit\">5.50/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods005.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">黄肉桃</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥10.00</span>\n\t\t\t\t\t\t<span class=\"unit\">10.00/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods006.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">进口西梅</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥28.80</span>\n\t\t\t\t\t\t<span class=\"unit\">28.8/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#\"><img src=\"images/goods/goods007.jpg\"></a>\n\t\t\t\t\t<h4><a href=\"#\">香梨</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥6.45</span>\n\t\t\t\t\t\t<span class=\"unit\">6.45/500g</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t</div>\n\t</div>\n\n\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/user_center_order.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-用户中心</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"main_con clearfix\">\n\t\t<div class=\"left_menu_con clearfix\">\n\t\t\t<h3>用户中心</h3>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"user_center_info.html\">· 个人信息</a></li>\n\t\t\t\t<li><a href=\"user_center_order.html\" class=\"active\">· 全部订单</a></li>\n\t\t\t\t<li><a href=\"user_center_site.html\">· 收货地址</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"right_content clearfix\">\n\t\t\t\t<h3 class=\"common_title2\">全部订单</h3>\n\t\t\t\t<ul class=\"order_list_th w978 clearfix\">\n\t\t\t\t\t<li class=\"col01\">2016-8-21 17:36:24</li>\n\t\t\t\t\t<li class=\"col02\">订单号：56872934</li>\n\t\t\t\t\t<li class=\"col02 stress\">未支付</li>\t\t\n\t\t\t\t</ul>\n\n\t\t\t\t<table class=\"order_list_table w980\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\"55%\">\n\t\t\t\t\t\t\t\t<ul class=\"order_goods_list clearfix\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<li class=\"col01\"><img src=\"images/goods02.jpg\"></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col02\">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>\t\n\t\t\t\t\t\t\t\t\t<li class=\"col03\">1</li>\n\t\t\t\t\t\t\t\t\t<li class=\"col04\">11.80元</li>\t\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t<ul class=\"order_goods_list clearfix\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<li class=\"col01\"><img src=\"images/goods02.jpg\"></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col02\">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>\t\n\t\t\t\t\t\t\t\t\t<li class=\"col03\">1</li>\n\t\t\t\t\t\t\t\t\t<li class=\"col04\">11.80元</li>\t\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td width=\"15%\">33.60元</td>\n\t\t\t\t\t\t\t<td width=\"15%\">待付款</td>\n\t\t\t\t\t\t\t<td width=\"15%\"><a href=\"#\" class=\"oper_btn\">去付款</a></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<ul class=\"order_list_th w978 clearfix\">\n\t\t\t\t\t<li class=\"col01\">2016-8-21 17:36:24</li>\n\t\t\t\t\t<li class=\"col02\">订单号：56872934</li>\n\t\t\t\t\t<li class=\"col02 stress\">已支付</li>\t\t\t\n\t\t\t\t</ul>\n\t\t\t\t<table class=\"order_list_table w980\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\"55%\">\n\t\t\t\t\t\t\t\t<ul class=\"order_goods_list clearfix\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<li class=\"col01\"><img src=\"images/goods02.jpg\"></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col02\">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>\t\n\t\t\t\t\t\t\t\t\t<li class=\"col03\">1</li>\n\t\t\t\t\t\t\t\t\t<li class=\"col04\">11.80元</li>\t\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t<ul class=\"order_goods_list clearfix\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<li class=\"col01\"><img src=\"images/goods02.jpg\"></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col02\">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>\t\n\t\t\t\t\t\t\t\t\t<li class=\"col03\">1</li>\n\t\t\t\t\t\t\t\t\t<li class=\"col04\">11.80元</li>\t\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td width=\"15%\">33.60元</td>\n\t\t\t\t\t\t\t<td width=\"15%\">已付款</td>\n\t\t\t\t\t\t\t<td width=\"15%\"><a href=\"#\" class=\"oper_btn\">查看物流</a></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\n\t\t\t\t<div class=\"pagenation\">\n\t\t\t\t\t<a href=\"#\"><上一页</a>\n\t\t\t\t\t<a href=\"#\" class=\"active\">1</a>\n\t\t\t\t\t<a href=\"#\">2</a>\n\t\t\t\t\t<a href=\"#\">3</a>\n\t\t\t\t\t<a href=\"#\">4</a>\n\t\t\t\t\t<a href=\"#\">5</a>\n\t\t\t\t\t<a href=\"#\">下一页></a>\n\t\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/static/user_center_site.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t<title>天天生鲜-用户中心</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/reset.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n</head>\n<body>\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_info fl\">\n\t\t\t\t\t欢迎您：<em>张 山</em>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"login.html\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"register.html\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_info.html\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"user_center_order.html\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"images/logo.png\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\t\t\n\t</div>\n\n\t<div class=\"main_con clearfix\">\n\t\t<div class=\"left_menu_con clearfix\">\n\t\t\t<h3>用户中心</h3>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"user_center_info.html\">· 个人信息</a></li>\n\t\t\t\t<li><a href=\"user_center_order.html\">· 全部订单</a></li>\n\t\t\t\t<li><a href=\"user_center_site.html\" class=\"active\">· 收货地址</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"right_content clearfix\">\n\t\t\t\t<h3 class=\"common_title2\">收货地址</h3>\n\t\t\t\t<div class=\"site_con\">\n\t\t\t\t\t<dl>\n\t\t\t\t\t\t<dt>当前地址：</dt>\n\t\t\t\t\t\t<dd>北京市 海淀区 东北旺西路8号中关村软件园 （李思 收） 182****7528</dd>\n\t\t\t\t\t</dl>\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"common_title2\">编辑地址</h3>\n\t\t\t\t<div class=\"site_con\">\n\t\t\t\t\t<form>\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>收件人：</label>\n\t\t\t\t\t\t\t<input type=\"text\" name=\"\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group form_group2\">\n\t\t\t\t\t\t\t<label>详细地址：</label>\n\t\t\t\t\t\t\t<textarea class=\"site_area\"></textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>邮编：</label>\n\t\t\t\t\t\t\t<input type=\"text\" name=\"\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>手机：</label>\n\t\t\t\t\t\t\t<input type=\"text\" name=\"\">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<input type=\"submit\" name=\"\" value=\"提交\" class=\"info_submit\">\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/templates/base.html",
    "content": "{# 首页 注册 登录 #}\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n{% load staticfiles %}\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n    {# 网页标题内容块 #}\n\t<title>{% block title %}{% endblock title %}</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'css/reset.css' %}\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'css/main.css' %}\">\n\t{# 网页顶部引入文件块 #}\n    {% block topfiles %}{% endblock topfiles %}\n</head>\n<body>\n{# 网页顶部欢迎信息块 #}\n{% block header_con %}\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n                {% if user.is_authenticated %}\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t欢迎您：<em>{{ user.username }}</em>\n                    <span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:logout' %}\">退出</a>\n\t\t\t\t</div>\n                {% else %}\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"{% url 'user:login' %}\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:register' %}\">注册</a>\n\t\t\t\t</div>\n                {% endif %}\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:user' %}\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'cart:show' %}\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:order' 1 %}\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n{% endblock header_con %}\n\n{# 网页顶部搜索框块 #}\n{% block search_bar %}\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"{% static 'images/logo.png' %}\"></a>\n\t\t<div class=\"search_con fl\">\n            <form method=\"get\" action=\"/search\">\n                <input type=\"text\" class=\"input_text fl\" name=\"q\" placeholder=\"搜索商品\">\n                <input type=\"submit\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n            </form>\n\t\t</div>\n\t\t<div class=\"guest_cart fr\">\n\t\t\t<a href=\"#\" class=\"cart_name fl\">我的购物车</a>\n\t\t\t<div class=\"goods_count fl\" id=\"show_count\">{{ cart_count }}</div>\n\t\t</div>\n\t</div>\n{% endblock search_bar %}\n\n{# 网站主体内容块 #}\n{% block body %}{% endblock body %}\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n    {# 网页底部html元素块 #}\n    {% block bottom %}{% endblock bottom %}\n    {# 网页底部引入文件块 #}\n\t{% block bottomfiles %}{% endblock bottomfiles %}\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/templates/base_detail_list.html",
    "content": "{# 详情页 列表页 #}\n{% extends 'base.html' %}\n{# 网站主体内容块 #}\n{% block body %}\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar clearfix\">\n\t\t\t<div class=\"subnav_con fl\">\n\t\t\t\t<h1>全部商品分类</h1>\n\t\t\t\t<span></span>\n\t\t\t\t<ul class=\"subnav\">\n                    {% for type in types %}\n\t\t\t\t\t<li><a href=\"{% url 'goods:list' type.id 1 %}\" class=\"{{ type.logo }}\">{{ type.name }}</a></li>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n    {# 详情页，列表页主体内容块 #}\n    {% block main_content %}{% endblock main_content %}\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/base_no_cart.html",
    "content": "{# 购物车 提交订单 #}\n{% extends 'base.html' %}\n{% load staticfiles %}\n{# 网页顶部搜索框块 #}\n{% block search_bar %}\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"{% static 'images/logo.png' %}\"></a>\n\t\t<div class=\"sub_page_name fl\">|&nbsp;&nbsp;&nbsp;&nbsp;{% block page_title %}{% endblock page_title %}</div>\n\t\t<div class=\"search_con fr\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\n\t</div>\n{% endblock search_bar %}"
  },
  {
    "path": "dailyfresh/templates/base_user_center.html",
    "content": "{# 用户中心3页面 #}\n{% extends 'base_no_cart.html' %}\n{% block title %}天天生鲜-用户中心{% endblock title %}\n{% block page_title %}用户中心{% endblock page_title %}\n{% block body %}\n    <div class=\"main_con clearfix\">\n\t\t<div class=\"left_menu_con clearfix\">\n\t\t\t<h3>用户中心</h3>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"{% url 'user:user' %}\" {% if page == 'user' %}class=\"active\"{% endif %}>· 个人信息</a></li>\n\t\t\t\t<li><a href=\"{% url 'user:order' 1 %}\" {% if page == 'order' %}class=\"active\"{% endif %}>· 全部订单</a></li>\n\t\t\t\t<li><a href=\"{% url 'user:address' %}\" {% if page == 'address' %}class=\"active\"{% endif %}>· 收货地址</a></li>\n\t\t\t</ul>\n\t\t</div>\n        {# 用户中心右侧内容块 #}\n        {% block right_content %}{% endblock right_content %}\n    </div>\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/cart.html",
    "content": "{% extends 'base_no_cart.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-购物车{% endblock title %}\n{% block page_title %}购物车{% endblock page_title %}\n{% block body %}\n\t<div class=\"total_count\">全部商品<em>{{ total_count }}</em>件</div>\n\t<ul class=\"cart_list_th clearfix\">\n\t\t<li class=\"col01\">商品名称</li>\n\t\t<li class=\"col02\">商品单位</li>\n\t\t<li class=\"col03\">商品价格</li>\n\t\t<li class=\"col04\">数量</li>\n\t\t<li class=\"col05\">小计</li>\n\t\t<li class=\"col06\">操作</li>\n\t</ul>\n    <form method=\"post\" action=\"{% url 'order:place' %}\">\n    {% for sku in skus %}\n\t<ul class=\"cart_list_td clearfix\">\n\t\t<li class=\"col01\"><input type=\"checkbox\" name=\"sku_ids\" value=\"{{ sku.id }}\" checked></li>\n\t\t<li class=\"col02\"><img src=\"{{ sku.image.url }}\"></li>\n\t\t<li class=\"col03\">{{ sku.name }}<br><em>{{ sku.price }}元/{{ sku.unite }}</em></li>\n\t\t<li class=\"col04\">{{ sku.unite }}</li>\n\t\t<li class=\"col05\">{{ sku.price }}元</li>\n\t\t<li class=\"col06\">\n\t\t\t<div class=\"num_add\">\n\t\t\t\t<a href=\"javascript:;\" class=\"add fl\">+</a>\n\t\t\t\t<input type=\"text\" sku_id=\"{{ sku.id }}\" class=\"num_show fl\" value=\"{{ sku.count }}\">\n\t\t\t\t<a href=\"javascript:;\" class=\"minus fl\">-</a>\t\n\t\t\t</div>\n\t\t</li>\n\t\t<li class=\"col07\">{{ sku.amount }}元</li>\n\t\t<li class=\"col08\"><a href=\"javascript:;\">删除</a></li>\n\t</ul>\n    {% endfor %}\n\n\t<ul class=\"settlements\">\n        {% csrf_token %}\n\t\t<li class=\"col01\"><input type=\"checkbox\" name=\"\" checked=\"\"></li>\n\t\t<li class=\"col02\">全选</li>\n\t\t<li class=\"col03\">合计(不含运费)：<span>¥</span><em>{{ total_price }}</em><br>共计<b>{{ total_count }}</b>件商品</li>\n\t\t<li class=\"col04\"><input type=\"submit\" value=\"去结算\"></li>\n\t</ul>\n    </form>\n{% endblock body %}\n{% block bottomfiles %}\n    <script src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n    <script>\n    // 计算被选中的商品的总件数和总价格\n    function update_page_info() {\n        // 获取所有被选中的商品的checkbox\n        // 获取所有被选中的商品所在的ul元素\n        total_count = 0\n        total_price = 0\n        $('.cart_list_td').find(':checked').parents('ul').each(function () {\n            // 获取商品的数目和小计\n            count = $(this).find('.num_show').val()\n            amount = $(this).children('.col07').text()\n            // 累加计算商品的总件数和总价格\n            count = parseInt(count)\n            amount = parseFloat(amount)\n            total_count += count\n            total_price += amount\n        })\n        // 设置被选中的商品的总件数和总价格\n        $('.settlements').find('em').text(total_price.toFixed(2))\n        $('.settlements').find('b').text(total_count)\n    }\n\n    // 计算商品的小计\n    function update_goods_amount(sku_ul) {\n        // 获取商品的价格和数量\n        count = sku_ul.find('.num_show').val()\n        price = sku_ul.children('.col05').text()\n        // 计算商品的小计\n        amount = parseInt(count)*parseFloat(price)\n        // 设置商品的小计\n        sku_ul.children('.col07').text(amount.toFixed(2)+'元')\n    }\n\n    // 商品的全选和全不选\n    $('.settlements').find(':checkbox').change(function () {\n        // 获取全选的checkbox的选中状态\n        is_checked = $(this).prop('checked')\n        // 遍历商品的对应的checkbox，设置这些checkbox的选中状态和全选的checkbox保持一致\n        $('.cart_list_td').find(':checkbox').each(function () {\n            $(this).prop('checked', is_checked)\n        })\n        // 更新页面的信息\n        update_page_info()\n    })\n\n    // 商品对应的checkbox状态发生改变时，设置全选checkbox的状态\n    $('.cart_list_td').find(':checkbox').change(function () {\n        // 获取页面上所有商品的数目\n        all_len = $('.cart_list_td').length\n        // 获取页面上被选中的商品的数目\n        checked_len = $('.cart_list_td').find(':checked').length\n        is_checked = true\n        if (checked_len < all_len){\n            is_checked = false\n        }\n        $('.settlements').find(':checkbox').prop('checked', is_checked)\n        // 更新页面的信息\n        update_page_info()\n    })\n\n    // 更新购物车中商品的数量\n    error_update = false\n    total = 0\n    function update_remote_cart_info(sku_id, count) {\n        csrf = $('input[name=\"csrfmiddlewaretoken\"]').val()\n        // 组织参数\n        params = {'sku_id':sku_id, 'count':count, 'csrfmiddlewaretoken':csrf}\n        // 设置ajax请求为同步\n        $.ajaxSettings.async = false\n        // 发起ajax post请求，访问/cart/update, 传递参数:sku_id count\n        // 默认发起的ajax请求都是异步的，不会等回调函数执行\n        $.post('/cart/update', params, function (data) {\n            if (data.res == 5){\n                // 更新成功\n                error_update = false\n                total = data.total_count\n            }\n            else{\n                // 更新失败\n                error_update = true\n                alert(data.errmsg)\n            }\n        })\n        // 设置ajax请求为异步\n        $.ajaxSettings.async = true\n    }\n\n    // 购物车商品数量的增加\n    $('.add').click(function () {\n        // 获取商品的id和商品的数量\n        sku_id = $(this).next().attr('sku_id')\n        count = $(this).next().val()\n\n        // 组织参数\n        count = parseInt(count)+1\n\n        // 更新购物车记录\n        update_remote_cart_info(sku_id, count)\n\n        // 判断更新是否成功\n        if (error_update == false){\n            // 重新设置商品的数目\n            $(this).next().val(count)\n            // 计算商品的小计\n            update_goods_amount($(this).parents('ul'))\n            // 获取商品对应的checkbox的选中状态，如果被选中，更新页面信息\n            is_checked = $(this).parents('ul').find(':checkbox').prop('checked')\n            if (is_checked){\n                // 更新页面信息\n                update_page_info()\n            }\n            // 更新页面上购物车商品的总件数\n            $('.total_count').children('em').text(total)\n        }\n    })\n\n    // 购物车商品数量的减少\n    $('.minus').click(function () {\n        // 获取商品的id和商品的数量\n        sku_id = $(this).prev().attr('sku_id')\n        count = $(this).prev().val()\n\n        // 校验参数\n        count = parseInt(count)-1\n        if (count <= 0){\n            return\n        }\n\n        // 更新购物车中的记录\n        update_remote_cart_info(sku_id, count)\n\n        // 判断更新是否成功\n        if (error_update == false){\n            // 重新设置商品的数目\n            $(this).prev().val(count)\n            // 计算商品的小计\n            update_goods_amount($(this).parents('ul'))\n            // 获取商品对应的checkbox的选中状态，如果被选中，更新页面信息\n            is_checked = $(this).parents('ul').find(':checkbox').prop('checked')\n            if (is_checked){\n                // 更新页面信息\n                update_page_info()\n            }\n            // 更新页面上购物车商品的总件数\n            $('.total_count').children('em').text(total)\n        }\n    })\n\n    // 记录用户输入之前商品的数量\n    pre_count = 0\n    $('.num_show').focus(function () {\n        pre_count = $(this).val()\n    })\n\n    // 手动输入购物车中的商品数量\n    $('.num_show').blur(function () {\n        // 获取商品的id和商品的数量\n        sku_id = $(this).attr('sku_id')\n        count = $(this).val()\n\n        // 校验参数\n        if (isNaN(count) || count.trim().length==0 || parseInt(count)<=0){\n            // 设置商品的数目为用户输入之前的数目\n            $(this).val(pre_count)\n            return\n        }\n\n        // 更新购物车中的记录\n        count = parseInt(count)\n        update_remote_cart_info(sku_id, count)\n\n        // 判断更新是否成功\n        if (error_update == false){\n            // 重新设置商品的数目\n            $(this).val(count)\n            // 计算商品的小计\n            update_goods_amount($(this).parents('ul'))\n            // 获取商品对应的checkbox的选中状态，如果被选中，更新页面信息\n            is_checked = $(this).parents('ul').find(':checkbox').prop('checked')\n            if (is_checked){\n                // 更新页面信息\n                update_page_info()\n            }\n            // 更新页面上购物车商品的总件数\n            $('.total_count').children('em').text(total)\n        }\n        else{\n            // 设置商品的数目为用户输入之前的数目\n            $(this).val(pre_count)\n        }\n    })\n\n    // 删除购物车中的记录\n    $('.cart_list_td').children('.col08').children('a').click(function () {\n        // 获取对应商品的id\n        sku_id = $(this).parents('ul').find('.num_show').attr('sku_id')\n        csrf = $('input[name=\"csrfmiddlewaretoken\"]').val()\n        // 组织参数\n        params = {'sku_id':sku_id, 'csrfmiddlewaretoken':csrf}\n        // 获取商品所在的ul元素\n        sku_ul = $(this).parents('ul')\n        // 发起ajax post请求， 访问/cart/delete, 传递参数:sku_id\n        $.post('/cart/delete', params, function (data) {\n            if (data.res == 3){\n                // 删除成功，异常页面上商品所在的ul元素\n                sku_ul.remove()\n                // 获取sku_ul中商品的选中状态\n                is_checked = sku_ul.find(':checkbox').prop('checked')\n                if (is_checked){\n                    // 更新页面信息\n                    update_page_info()\n                }\n                // 重新设置页面上购物车中商品的总件数\n                $('.total_count').children('em').text(data.total_count)\n            }\n            else{\n                alert(data.errmsg)\n            }\n        })\n    })\n\n    </script>\n{% endblock bottomfiles %}"
  },
  {
    "path": "dailyfresh/templates/detail.html",
    "content": "{% extends 'base_detail_list.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-商品详情{% endblock title %}\n\n{% block main_content %}\n\t<div class=\"breadcrumb\">\n\t\t<a href=\"#\">全部分类</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">{{ sku.type.name }}</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">商品详情</a>\n\t</div>\n\n\t<div class=\"goods_detail_con clearfix\">\n\t\t<div class=\"goods_detail_pic fl\"><img src=\"{{ sku.image.url }}\"></div>\n\n\t\t<div class=\"goods_detail_list fr\">\n\t\t\t<h3>{{ sku.name }}</h3>\n\t\t\t<p>{{ sku.desc }}</p>\n\t\t\t<div class=\"prize_bar\">\n\t\t\t\t<span class=\"show_pirze\">¥<em>{{ sku.price }}</em></span>\n\t\t\t\t<span class=\"show_unit\">单  位：{{ sku.unite }}</span>\n\t\t\t</div>\n\t\t\t<div class=\"goods_num clearfix\">\n\t\t\t\t<div class=\"num_name fl\">数 量：</div>\n\t\t\t\t<div class=\"num_add fl\">\n\t\t\t\t\t<input type=\"text\" class=\"num_show fl\" value=\"1\">\n\t\t\t\t\t<a href=\"javascript:;\" class=\"add fr\">+</a>\n\t\t\t\t\t<a href=\"javascript:;\" class=\"minus fr\">-</a>\t\n\t\t\t\t</div> \n\t\t\t</div>\n            <div>\n                <p>其他规格:</p>\n                <ul>\n                    {% for sku in same_spu_skus %}\n                        <li><a href=\"{% url 'goods:detail' sku.id %}\">{{ sku.name }}</a></li>\n                    {% endfor %}\n                </ul>\n            </div>\n\n\t\t\t<div class=\"total\">总价：<em>16.80元</em></div>\n\t\t\t<div class=\"operate_btn\">\n                {% csrf_token %}\n\t\t\t\t<a href=\"javascript:;\" class=\"buy_btn\">立即购买</a>\n\t\t\t\t<a href=\"javascript:;\" sku_id=\"{{ sku.id }}\" class=\"add_cart\" id=\"add_cart\">加入购物车</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"main_wrap clearfix\">\n\t\t<div class=\"l_wrap fl clearfix\">\n\t\t\t<div class=\"new_goods\">\n\t\t\t\t<h3>新品推荐</h3>\n\t\t\t\t<ul>\n                    {% for sku in new_skus %}\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"{% url 'goods:detail' sku.id %}\"><img src=\"{{ sku.image.url }}\"></a>\n\t\t\t\t\t\t<h4><a href=\"{% url 'goods:detail' sku.id %}\">{{ sku.name }}</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥{{ sku.price }}</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t{% endfor %}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"r_wrap fr clearfix\">\n\t\t\t<ul class=\"detail_tab clearfix\">\n\t\t\t\t<li id='tag_detail' class=\"active\">商品介绍</li>\n\t\t\t\t<li id=\"tag_comment\">评论</li>\n\t\t\t</ul>\n\n\t\t\t<div class=\"tab_content\" id=\"tab_detail\">\n\t\t\t\t<dl>\n\t\t\t\t\t<dt>商品详情：</dt>\n                    <dd>{{ sku.goods.detail|safe }}</dd>\n\t\t\t\t</dl>\n\t\t\t</div>\n\n            <div class=\"tab_content\" id=\"tab_comment\" style=\"display: none\">\n\t\t\t\t<dl>\n                    {% for order in sku_orders %}\n\t\t\t\t\t<dt>评论时间：{{ order.update_time }}&nbsp;&nbsp;用户名:{{ order.order.user.username }}</dt>\n                    <dd>评论内容:{{ order.comment }}</dd>\n                    {% endfor %}\n\t\t\t\t</dl>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{% endblock main_content %}\n{% block bottom %}\n\t<div class=\"add_jump\"></div>\n{% endblock bottom %}\n{% block bottomfiles %}\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n\t<script type=\"text/javascript\">\n        $('#tag_detail').click(function () {\n            $('#tag_comment').removeClass('active')\n            $(this).addClass('active')\n            $('#tab_detail').show()\n            $('#tab_comment').hide()\n        })\n\n        $('#tag_comment').click(function () {\n            $('#tag_detail').removeClass('active')\n            $(this).addClass('active')\n            $('#tab_detail').hide()\n            $('#tab_comment').show()\n        })\n\n        update_goods_amount()\n        // 计算商品的总价格\n        function update_goods_amount() {\n            // 获取商品的单价和数量\n            price = $('.show_pirze').children('em').text()\n            count = $('.num_show').val()\n            // 计算商品的总价\n            price = parseFloat(price)\n            count = parseInt(count)\n            amount = price*count\n            // 设置商品的总价\n            $('.total').children('em').text(amount.toFixed(2)+'元')\n        }\n\n        // 增加商品的数量\n        $('.add').click(function () {\n            // 获取商品原有的数目\n            count = $('.num_show').val()\n            // 加1\n            count = parseInt(count)+1\n            // 重新设置商品的数目\n            $('.num_show').val(count)\n            // 更新商品的总价\n            update_goods_amount()\n        })\n\n        // 减少商品的数量\n        $('.minus').click(function () {\n            // 获取商品原有的数目\n            count = $('.num_show').val()\n            // 减1\n            count = parseInt(count)-1\n            if (count <= 0){\n                count = 1\n            }\n            // 重新设置商品的数目\n            $('.num_show').val(count)\n            // 更新商品的总价\n            update_goods_amount()\n        })\n\n        // 手动输入商品的数量\n        $('.num_show').blur(function () {\n            // 获取用户输入的数目\n            count = $(this).val()\n            // 校验count是否合法\n            if (isNaN(count) || count.trim().length==0 || parseInt(count) <=0){\n                count = 1\n            }\n            // 重新设置商品的数目\n            $(this).val(parseInt(count))\n            // 更新商品的总价\n            update_goods_amount()\n        })\n\n        // 获取add_cart div元素左上角的坐标\n\t\tvar $add_x = $('#add_cart').offset().top;\n\t\tvar $add_y = $('#add_cart').offset().left;\n\n        // 获取show_count div元素左上角的坐标\n\t\tvar $to_x = $('#show_count').offset().top;\n\t\tvar $to_y = $('#show_count').offset().left;\n\n\n\t\t$('#add_cart').click(function(){\n            // 获取商品id和商品数量\n            sku_id = $(this).attr('sku_id') // attr prop\n            count = $('.num_show').val()\n            csrf = $('input[name=\"csrfmiddlewaretoken\"]').val()\n            // 组织参数\n            params = {'sku_id':sku_id, 'count':count, 'csrfmiddlewaretoken':csrf}\n            // 发起ajax post请求，访问/cart/add, 传递参数:sku_id count\n            $.post('/cart/add', params, function (data) {\n                if (data.res == 5){\n                    // 添加成功\n                    $(\".add_jump\").css({'left':$add_y+80,'top':$add_x+10,'display':'block'})\n                    $(\".add_jump\").stop().animate({\n                        'left': $to_y+7,\n                        'top': $to_x+7},\n                        \"fast\", function() {\n                            $(\".add_jump\").fadeOut('fast',function(){\n                                // 重新设置用户购物车中商品的条目数\n                                $('#show_count').html(data.total_count);\n                            });\n\t\t\t        });\n                }\n                else{\n                    // 添加失败\n                    alert(data.errmsg)\n                }\n            })\n\t\t})\n\t</script>\n{% endblock bottomfiles %}"
  },
  {
    "path": "dailyfresh/templates/index.html",
    "content": "{% extends 'base.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-首页{% endblock title %}\n{% block topfiles %}\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-ui.min.js' %}\"></script>\n\t<script type=\"text/javascript\" src=\"{% static 'js/slide.js' %}\"></script>\n{% endblock topfiles %}\n{% block body %}\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar\">\n\t\t\t<h1 class=\"fl\">全部商品分类</h1>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\n\t<div class=\"center_con clearfix\">\n\t\t<ul class=\"subnav fl\">\n            {% for type in types %}\n\t\t\t    <li><a href=\"#model0{{ forloop.counter }}\" class=\"{{ type.logo }}\">{{ type.name }}</a></li>\n            {% endfor %}\n\t\t</ul>\n\t\t<div class=\"slide fl\">\n\t\t\t<ul class=\"slide_pics\">\n                {% for banner in goods_banners  %}\n\t\t\t\t    <li><a href=\"{% url 'goods:detail' banner.sku.id %}\"><img src=\"{{ banner.image.url }}\" alt=\"幻灯片\"></a></li>\n                {% endfor %}\n\t\t\t</ul>\n\t\t\t<div class=\"prev\"></div>\n\t\t\t<div class=\"next\"></div>\n\t\t\t<ul class=\"points\"></ul>\n\t\t</div>\n\t\t<div class=\"adv fl\">\n            {% for banner in promotion_banners %}\n\t\t\t    <a href=\"{{ banner.url }}\"><img src=\"{{ banner.image.url }}\"></a>\n            {% endfor %}\n\t\t</div>\n\t</div>\n\n    {% for type in types %}\n\t<div class=\"list_model\">\n\t\t<div class=\"list_title clearfix\">\n\t\t\t<h3 class=\"fl\" id=\"model0{{ forloop.counter }}\">{{ type.name }}</h3>\n\t\t\t<div class=\"subtitle fl\">\n\t\t\t\t<span>|</span>\n                {% for banner in type.title_banners %}\n\t\t\t\t    <a href=\"{% url 'goods:detail' banner.sku.id  %}\">{{ banner.sku.name }}</a>\n\t\t\t\t{% endfor %}\n\t\t\t</div>\n\t\t\t<a href=\"#\" class=\"goods_more fr\" id=\"fruit_more\">查看更多 ></a>\n\t\t</div>\n\n\t\t<div class=\"goods_con clearfix\">\n\t\t\t<div class=\"goods_banner fl\"><img src=\"{{ type.image.url }}\"></div>\n\t\t\t<ul class=\"goods_list fl\">\n                {% for banner in type.image_banners %}\n\t\t\t\t<li>\n\t\t\t\t\t<h4><a href=\"{% url 'goods:detail' banner.sku.id  %}\">{{ banner.sku.name }}</a></h4>\n\t\t\t\t\t<a href=\"{% url 'goods:detail' banner.sku.id  %}\"><img src=\"{{ banner.sku.image.url }}\"></a>\n\t\t\t\t\t<div class=\"prize\">¥ {{ banner.sku.price }}</div>\n\t\t\t\t</li>\n\t\t\t\t{% endfor %}\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n    {% endfor %}\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/list.html",
    "content": "{% extends 'base_detail_list.html' %}\n{% block title %}天天生鲜-商品列表{% endblock title %}\n{% block main_content %}\n\t<div class=\"breadcrumb\">\n\t\t<a href=\"#\">全部分类</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">{{ type.name }}</a>\n\t</div>\n\n\t<div class=\"main_wrap clearfix\">\n\t\t<div class=\"l_wrap fl clearfix\">\n\t\t\t<div class=\"new_goods\">\n\t\t\t\t<h3>新品推荐</h3>\n\t\t\t\t<ul>\n                    {% for sku in new_skus %}\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"{% url 'goods:detail' sku.id %}\"><img src=\"{{ sku.image.url }}\"></a>\n\t\t\t\t\t\t<h4><a href=\"{% url 'goods:detail' sku.id %}\">{{ sku.name }}</a></h4>\n\t\t\t\t\t\t<div class=\"prize\">￥{{ sku.price }}</div>\n\t\t\t\t\t</li>\n                    {% endfor %}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"r_wrap fr clearfix\">\n\t\t\t<div class=\"sort_bar\">\n\t\t\t\t<a href=\"{% url 'goods:list' type.id 1 %}\" {% if sort == 'default' %}class=\"active\"{% endif %}>默认</a>\n\t\t\t\t<a href=\"{% url 'goods:list' type.id 1 %}?sort=price\" {% if sort == 'price' %}class=\"active\"{% endif %}>价格</a>\n\t\t\t\t<a href=\"{% url 'goods:list' type.id 1 %}?sort=hot\" {% if sort == 'hot' %}class=\"active\"{% endif %}>人气</a>\n\t\t\t</div>\n\n\t\t\t<ul class=\"goods_type_list clearfix\">\n                {% for sku in skus_page %}\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"{% url 'goods:detail' sku.id %}\"><img src=\"{{ sku.image.url }}\"></a>\n\t\t\t\t\t<h4><a href=\"{% url 'goods:detail' sku.id %}\">{{ sku.name }}</a></h4>\n\t\t\t\t\t<div class=\"operate\">\n\t\t\t\t\t\t<span class=\"prize\">￥{{ sku.price }}</span>\n\t\t\t\t\t\t<span class=\"unit\">{{ sku.price}}/{{ sku.unite }}</span>\n\t\t\t\t\t\t<a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n                {% endfor %}\n\t\t\t</ul>\n\n\t\t\t<div class=\"pagenation\">\n                {% if skus_page.has_previous %}\n\t\t\t\t<a href=\"{% url 'goods:list' type.id skus_page.previous_page_number %}?sort={{ sort }}\"><上一页</a>\n                {% endif %}\n                {% for pindex in pages %}\n                    {% if pindex == skus_page.number %}\n\t\t\t\t        <a href=\"{% url 'goods:list' type.id pindex %}?sort={{ sort }}\" class=\"active\">{{ pindex }}</a>\n                    {% else %}\n\t\t\t\t        <a href=\"{% url 'goods:list' type.id pindex %}?sort={{ sort }}\">{{ pindex }}</a>\n                    {% endif %}\n\t\t\t\t{% endfor %}\n                {% if skus_page.has_next %}\n\t\t\t\t<a href=\"{% url 'goods:list' type.id skus_page.next_page_number %}?sort={{ sort }}\">下一页></a>\n                {% endif %}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{% endblock main_content %}"
  },
  {
    "path": "dailyfresh/templates/login.html",
    "content": "{% extends 'base.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-登录{% endblock title %}\n{% block header_con %}{% endblock header_con %}\n{% block search_bar %}{% endblock search_bar %}\n{% block body %}\n\t<div class=\"login_top clearfix\">\n\t\t<a href=\"index.html\" class=\"login_logo\"><img src=\"{% static 'images/logo02.png' %}\"></a>\n\t</div>\n\t<div class=\"login_form_bg\">\n\t\t<div class=\"login_form_wrap clearfix\">\n\t\t\t<div class=\"login_banner fl\"></div>\n\t\t\t<div class=\"slogan fl\">日夜兼程 · 急速送达</div>\n\t\t\t<div class=\"login_form fr\">\n\t\t\t\t<div class=\"login_title clearfix\">\n\t\t\t\t\t<h1>用户登录</h1>\n\t\t\t\t\t<a href=\"#\">立即注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form_input\">\n                    {# 不设置表单action时，提交表单时，会向浏览器地址栏中的地址提交数据 #}\n\t\t\t\t\t<form method=\"post\">\n                        {% csrf_token %}\n\t\t\t\t\t\t<input type=\"text\" name=\"username\" class=\"name_input\" value=\"{{ username }}\" placeholder=\"请输入用户名\">\n\t\t\t\t\t\t<div class=\"user_error\">输入错误</div>\n\t\t\t\t\t\t<input type=\"password\" name=\"pwd\" class=\"pass_input\" placeholder=\"请输入密码\">\n\t\t\t\t\t\t<div class=\"pwd_error\">输入错误</div>\n\t\t\t\t\t\t<div class=\"more_input clearfix\">\n\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"remember\" {{ checked }}>\n\t\t\t\t\t\t\t<label>记住用户名</label>\n\t\t\t\t\t\t\t<a href=\"#\">忘记密码</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type=\"submit\" name=\"\" value=\"登录\" class=\"input_submit\">\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n    {{ errmsg }}\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/order_comment.html",
    "content": "{% extends 'base_user_center.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-用户中心{% endblock %}\n{% block page_title %}用户中心{% endblock page_title %}\n{% block right_content %}\n        <div class=\"right_content clearfix\">\n            <h3 class=\"common_title2\">订单评价</h3>\n                <ul class=\"order_list_th w978 clearfix\">\n\t\t\t\t\t<li class=\"col01\">{{order.create_time}}</li>\n\t\t\t\t\t<li class=\"col02\">订单号：{{order.order_id}}</li>\n\t\t\t\t\t<li class=\"col02 stress\">{{order.status_name}}</li>\n\t\t\t\t</ul>\n            <form method=\"post\">\n                {% csrf_token %}\n                {# 订单id #}\n                <input type=\"hidden\" name=\"order_id\" value=\"{{order.order_id}}\">\n                {# 订单中有几个商品 #}\n                <input type=\"hidden\" name=\"total_count\" value=\"{{order.order_skus|length}}\">\n                {% for order_sku in order.order_skus %}\n                <table class=\"order_list_table w980\">\n                    <tbody>\n                        <tr>\n                            <td width=\"80%\">\n                                <ul class=\"order_goods_list clearfix\">\n                                    <li class=\"col01\"><img src=\"{{ order_sku.sku.image.url }}\"></li>\n                                    <li class=\"col02\">{{order_sku.sku.name}}<em>{{order_sku.price}}/{{order_sku.sku.unite}}</em></li>\n                                    <li class=\"col03\">{{order_sku.count}}</li>\n                                </ul>\n                            </td>\n                            <td width=\"20%\">{{order_sku.amount}}元</td>\n                        </tr>\n                    </tbody>\n                </table>\n                <div class=\"site_con\">\n                    <input type=\"hidden\" name=\"sku_{{forloop.counter}}\" value=\"{{order_sku.sku.id}}\">\n                    <div class=\"form_group form_group2\">\n                        <label>评价内容：</label>\n                        <textarea class=\"site_area\" name=\"content_{{forloop.counter}}\"></textarea>\n                    </div>\n                </div>\n                {% endfor %}\n                <input type=\"submit\" name=\"\" value=\"提交\" class=\"info_submit\">\n            </form>\n        </div>\n{% endblock right_content %}\n"
  },
  {
    "path": "dailyfresh/templates/place_order.html",
    "content": "{% extends 'base_no_cart.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-提交订单{% endblock title %}\n{% block page_title %}提交订单{% endblock page_title %}\n{% block body %}\n\t<h3 class=\"common_title\">确认收货地址</h3>\n\n\t<div class=\"common_list_con clearfix\">\n\t\t<dl>\n\t\t\t<dt>寄送到：</dt>\n            {% for addr in addrs %}\n\t\t\t<dd><input type=\"radio\" name=\"addr_id\" value=\"{{ addr.id }}\" {% if addr.is_default %}checked{% endif %}>{{ addr.addr }} （{{ addr.receiver }} 收） {{ addr.phone }}</dd>\n\t\t    {% endfor %}\n        </dl>\n\t\t<a href=\"{% url 'user:address' %}\" class=\"edit_site\">编辑收货地址</a>\n\n\t</div>\n\t\n\t<h3 class=\"common_title\">支付方式</h3>\t\n\t<div class=\"common_list_con clearfix\">\n\t\t<div class=\"pay_style_con clearfix\">\n\t\t\t<input type=\"radio\" name=\"pay_style\" value=\"1\" checked>\n\t\t\t<label class=\"cash\">货到付款</label>\n\t\t\t<input type=\"radio\" name=\"pay_style\" value=\"2\">\n\t\t\t<label class=\"weixin\">微信支付</label>\n\t\t\t<input type=\"radio\" name=\"pay_style\" value=\"3\">\n\t\t\t<label class=\"zhifubao\"></label>\n\t\t\t<input type=\"radio\" name=\"pay_style\" value=\"4\">\n\t\t\t<label class=\"bank\">银行卡支付</label>\n\t\t</div>\n\t</div>\n\n\t<h3 class=\"common_title\">商品列表</h3>\n\t\n\t<div class=\"common_list_con clearfix\">\n\t\t<ul class=\"goods_list_th clearfix\">\n\t\t\t<li class=\"col01\">商品名称</li>\n\t\t\t<li class=\"col02\">商品单位</li>\n\t\t\t<li class=\"col03\">商品价格</li>\n\t\t\t<li class=\"col04\">数量</li>\n\t\t\t<li class=\"col05\">小计</li>\t\t\n\t\t</ul>\n        {% for sku in skus %}\n\t\t<ul class=\"goods_list_td clearfix\">\n\t\t\t<li class=\"col01\">{{ forloop.counter }}</li>\n\t\t\t<li class=\"col02\"><img src=\"{{ sku.image.url }}\"></li>\n\t\t\t<li class=\"col03\">{{ sku.name }}</li>\n\t\t\t<li class=\"col04\">{{ sku.unite }}</li>\n\t\t\t<li class=\"col05\">{{ sku.price }}元</li>\n\t\t\t<li class=\"col06\">{{ sku.count }}</li>\n\t\t\t<li class=\"col07\">{{ sku.amount }}元</li>\n\t\t</ul>\n        {% endfor %}\n\t</div>\n\n\t<h3 class=\"common_title\">总金额结算</h3>\n\n\t<div class=\"common_list_con clearfix\">\n\t\t<div class=\"settle_con\">\n\t\t\t<div class=\"total_goods_count\">共<em>{{ total_count }}</em>件商品，总金额<b>{{ total_price }}元</b></div>\n\t\t\t<div class=\"transit\">运费：<b>{{ transit_price }}元</b></div>\n\t\t\t<div class=\"total_pay\">实付款：<b>{{ total_pay }}元</b></div>\n\t\t</div>\n\t</div>\n\n\t<div class=\"order_submit clearfix\">\n        {% csrf_token %}\n\t\t<a href=\"javascript:;\" sku_ids={{ sku_ids }} id=\"order_btn\">提交订单</a>\n\t</div>\t\n{% endblock body %}\n{% block bottom %}\n\t<div class=\"popup_con\">\n\t\t<div class=\"popup\">\n\t\t\t<p>订单提交成功！</p>\n\t\t</div>\n\t\t\n\t\t<div class=\"mask\"></div>\n\t</div>\n{% endblock bottom %}\n{% block bottomfiles %}\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n\t<script type=\"text/javascript\">\n\t\t$('#order_btn').click(function() {\n            // 获取用户选择的地址id, 支付方式, 要购买的商品id字符串\n            addr_id = $('input[name=\"addr_id\"]:checked').val()\n            pay_method = $('input[name=\"pay_style\"]:checked').val()\n            sku_ids = $(this).attr('sku_ids')\n            csrf = $('input[name=\"csrfmiddlewaretoken\"]').val()\n            // alert(addr_id+\":\"+pay_method+':'+sku_ids)\n            // 组织参数\n            params = {'addr_id':addr_id, 'pay_method':pay_method, 'sku_ids':sku_ids,\n                        'csrfmiddlewaretoken':csrf}\n            // 发起ajax post请求，访问/order/commit, 传递的参数: addr_id pay_method, sku_ids\n            $.post('/order/commit', params, function (data) {\n                if (data.res == 5){\n                    // 创建成功\n                    localStorage.setItem('order_finish',2);\n                    $('.popup_con').fadeIn('fast', function() {\n\n                        setTimeout(function(){\n                            $('.popup_con').fadeOut('fast',function(){\n                                window.location.href = '/user/order/1';\n                            });\n                        },3000)\n\n                    });\n                }\n                else{\n                    alert(data.errmsg)\n                }\n            })\n\n\n\n\t\t});\n\t</script>\n{% endblock bottomfiles %}"
  },
  {
    "path": "dailyfresh/templates/register.html",
    "content": "{% extends 'base.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-注册{% endblock title %}\n{% block topfiles %}\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n\t<script type=\"text/javascript\" src=\"{% static 'js/register.js' %}\"></script>\n{% endblock topfiles %}\n{% block header_con %}{% endblock header_con %}\n{% block search_bar %}{% endblock search_bar %}\n{% block body %}\n\t<div class=\"register_con\">\n\t\t<div class=\"l_con fl\">\n\t\t\t<a class=\"reg_logo\"><img src=\"{% static 'images/logo02.png' %}\"></a>\n\t\t\t<div class=\"reg_slogan\">足不出户  ·  新鲜每一天</div>\n\t\t\t<div class=\"reg_banner\"></div>\n\t\t</div>\n\n\t\t<div class=\"r_con fr\">\n\t\t\t<div class=\"reg_title clearfix\">\n\t\t\t\t<h1>用户注册</h1>\n\t\t\t\t<a href=\"#\">登录</a>\n\t\t\t</div>\n\t\t\t<div class=\"reg_form clearfix\">\n\t\t\t\t<form method=\"post\" action=\"/user/register\">\n                    {% csrf_token %}\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>用户名:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"user_name\" id=\"user_name\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\t\t\t\t\t\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>密码:</label>\n\t\t\t\t\t\t<input type=\"password\" name=\"pwd\" id=\"pwd\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>确认密码:</label>\n\t\t\t\t\t\t<input type=\"password\" name=\"cpwd\" id=\"cpwd\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>邮箱:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"email\" id=\"email\">\n\t\t\t\t\t\t<span class=\"error_tip\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"agreement\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"allow\" id=\"allow\" checked=\"checked\">\n\t\t\t\t\t\t<label>同意”天天生鲜用户使用协议“</label>\n\t\t\t\t\t\t<span class=\"error_tip2\">提示信息</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"reg_sub\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"注 册\" name=\"\">\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\t\t\t\t\n\t\t\t\t</form>\n                {{ errmsg }}\n\t\t\t</div>\n\n\t\t</div>\n\n\t</div>\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/search/indexes/goods/goodssku_text.txt",
    "content": "# 指定根据表中的哪些字段建立索引数据\n{{ object.name }} # 根据商品的名称建立索引\n{{ object.desc }} # 根据商品的简介建立索引\n{{ object.goods.detail }} # 根据商品的详情建立索引"
  },
  {
    "path": "dailyfresh/templates/search/search.html",
    "content": "{% extends 'base_detail_list.html' %}\n{% block title %}天天生鲜-商品搜索结果列表{% endblock title %}\n{% block main_content %}\n\t<div class=\"breadcrumb\">\n\t\t<a href=\"#\">{{ query }}</a>\n\t\t<span>></span>\n\t\t<a href=\"#\">搜索结果如下:</a>\n\t</div>\n\n\t<div class=\"main_wrap clearfix\">\n        <ul class=\"goods_type_list clearfix\">\n            {% for item in page %}\n            <li>\n                <a href=\"{% url 'goods:detail' item.object.id %}\"><img src=\"{{ item.object.image.url }}\"></a>\n                <h4><a href=\"{% url 'goods:detail' item.object.id %}\">{{ item.object.name }}</a></h4>\n                <div class=\"operate\">\n                    <span class=\"prize\">￥{{ item.object.price }}</span>\n                    <span class=\"unit\">{{ item.object.price}}/{{ item.object.unite }}</span>\n                    <a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n                </div>\n            </li>\n            {% endfor %}\n        </ul>\n        <div class=\"pagenation\">\n                {% if page.has_previous %}\n\t\t\t\t<a href=\"/search?q={{ query }}&page={{ page.previous_page_number }}\"><上一页</a>\n                {% endif %}\n                {% for pindex in paginator.page_range %}\n                    {% if pindex == page.number %}\n\t\t\t\t        <a href=\"/search?q={{ query }}&page={{ pindex }}\" class=\"active\">{{ pindex }}</a>\n                    {% else %}\n\t\t\t\t        <a href=\"/search?q={{ query }}&page={{ pindex }}\">{{ pindex }}</a>\n                    {% endif %}\n\t\t\t\t{% endfor %}\n                {% if spage.has_next %}\n\t\t\t\t<a href=\"/search?q={{ query }}&page={{ page.next_page_number }}\">下一页></a>\n                {% endif %}\n\t\t\t</div>\n\t</div>\n{% endblock main_content %}"
  },
  {
    "path": "dailyfresh/templates/search/search1.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Title</title>\n</head>\n<body>\n搜索的关键字:{{ query }}<br/>\n当前页的Page对象:{{ page }}<br/>\n<ul>\n    {% for item in page %}\n        <li>{{ item.object }}</li>\n    {% endfor %}\n</ul>\n分页paginator对象:{{ paginator }}<br/>\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/templates/static_base.html",
    "content": "{# 首页 注册 登录 #}\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n{% load staticfiles %}\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n    {# 网页标题内容块 #}\n\t<title>{% block title %}{% endblock title %}</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'css/reset.css' %}\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'css/main.css' %}\">\n\t{# 网页顶部引入文件块 #}\n    {% block topfiles %}{% endblock topfiles %}\n</head>\n<body>\n{# 网页顶部欢迎信息块 #}\n{% block header_con %}\n\t<div class=\"header_con\">\n\t\t<div class=\"header\">\n\t\t\t<div class=\"welcome fl\">欢迎来到天天生鲜!</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<div class=\"login_btn fl\">\n\t\t\t\t\t<a href=\"{% url 'user:login' %}\">登录</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:register' %}\">注册</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"user_link fl\">\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:user' %}\">用户中心</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"cart.html\">我的购物车</a>\n\t\t\t\t\t<span>|</span>\n\t\t\t\t\t<a href=\"{% url 'user:order' %}\">我的订单</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n{% endblock header_con %}\n\n{# 网页顶部搜索框块 #}\n{% block search_bar %}\n\t<div class=\"search_bar clearfix\">\n\t\t<a href=\"index.html\" class=\"logo fl\"><img src=\"{% static 'images/logo.png' %}\"></a>\n\t\t<div class=\"search_con fl\">\n\t\t\t<input type=\"text\" class=\"input_text fl\" name=\"\" placeholder=\"搜索商品\">\n\t\t\t<input type=\"button\" class=\"input_btn fr\" name=\"\" value=\"搜索\">\n\t\t</div>\n\t\t<div class=\"guest_cart fr\">\n\t\t\t<a href=\"#\" class=\"cart_name fl\">我的购物车</a>\n\t\t\t<div class=\"goods_count fl\" id=\"show_count\">{{ cart_count }}</div>\n\t\t</div>\n\t</div>\n{% endblock search_bar %}\n\n{# 网站主体内容块 #}\n{% block body %}{% endblock body %}\n\n\t<div class=\"footer\">\n\t\t<div class=\"foot_link\">\n\t\t\t<a href=\"#\">关于我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">联系我们</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">招聘人才</a>\n\t\t\t<span>|</span>\n\t\t\t<a href=\"#\">友情链接</a>\t\t\n\t\t</div>\n\t\t<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>\n\t\t<p>电话：010-****888    京ICP备*******8号</p>\n\t</div>\n    {# 网页底部html元素块 #}\n    {% block bottom %}{% endblock bottom %}\n    {# 网页底部引入文件块 #}\n\t{% block bottomfiles %}{% endblock bottomfiles %}\n</body>\n</html>"
  },
  {
    "path": "dailyfresh/templates/static_index.html",
    "content": "{% extends 'static_base.html' %}\n{% load staticfiles %}\n{% block title %}天天生鲜-首页{% endblock title %}\n{% block topfiles %}\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n\t<script type=\"text/javascript\" src=\"{% static 'js/jquery-ui.min.js' %}\"></script>\n\t<script type=\"text/javascript\" src=\"{% static 'js/slide.js' %}\"></script>\n{% endblock topfiles %}\n{% block body %}\n\t<div class=\"navbar_con\">\n\t\t<div class=\"navbar\">\n\t\t\t<h1 class=\"fl\">全部商品分类</h1>\n\t\t\t<ul class=\"navlist fl\">\n\t\t\t\t<li><a href=\"\">首页</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">手机生鲜</a></li>\n\t\t\t\t<li class=\"interval\">|</li>\n\t\t\t\t<li><a href=\"\">抽奖</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\n\t<div class=\"center_con clearfix\">\n\t\t<ul class=\"subnav fl\">\n            {% for type in types %}\n\t\t\t    <li><a href=\"#model0{{ forloop.counter }}\" class=\"{{ type.logo }}\">{{ type.name }}</a></li>\n            {% endfor %}\n\t\t</ul>\n\t\t<div class=\"slide fl\">\n\t\t\t<ul class=\"slide_pics\">\n                {% for banner in goods_banners  %}\n\t\t\t\t    <li><a href=\"#\"><img src=\"{{ banner.image.url }}\" alt=\"幻灯片\"></a></li>\n                {% endfor %}\n\t\t\t</ul>\n\t\t\t<div class=\"prev\"></div>\n\t\t\t<div class=\"next\"></div>\n\t\t\t<ul class=\"points\"></ul>\n\t\t</div>\n\t\t<div class=\"adv fl\">\n            {% for banner in promotion_banners %}\n\t\t\t    <a href=\"{{ banner.url }}\"><img src=\"{{ banner.image.url }}\"></a>\n            {% endfor %}\n\t\t</div>\n\t</div>\n\n    {% for type in types %}\n\t<div class=\"list_model\">\n\t\t<div class=\"list_title clearfix\">\n\t\t\t<h3 class=\"fl\" id=\"model0{{ forloop.counter }}\">{{ type.name }}</h3>\n\t\t\t<div class=\"subtitle fl\">\n\t\t\t\t<span>|</span>\n                {% for banner in type.title_banners %}\n\t\t\t\t    <a href=\"#\">{{ banner.sku.name }}</a>\n\t\t\t\t{% endfor %}\n\t\t\t</div>\n\t\t\t<a href=\"#\" class=\"goods_more fr\" id=\"fruit_more\">查看更多 ></a>\n\t\t</div>\n\n\t\t<div class=\"goods_con clearfix\">\n\t\t\t<div class=\"goods_banner fl\"><img src=\"{{ type.image.url }}\"></div>\n\t\t\t<ul class=\"goods_list fl\">\n                {% for banner in type.image_banners %}\n\t\t\t\t<li>\n\t\t\t\t\t<h4><a href=\"#\">{{ banner.sku.name }}</a></h4>\n\t\t\t\t\t<a href=\"#\"><img src=\"{{ banner.sku.image.url }}\"></a>\n\t\t\t\t\t<div class=\"prize\">¥ {{ banner.sku.price }}</div>\n\t\t\t\t</li>\n\t\t\t\t{% endfor %}\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n    {% endfor %}\n{% endblock body %}"
  },
  {
    "path": "dailyfresh/templates/user_center_info.html",
    "content": "{% extends 'base_user_center.html' %}\n{% block right_content %}\n\t\t<div class=\"right_content clearfix\">\n\t\t\t\t<div class=\"info_con clearfix\">\n\t\t\t\t<h3 class=\"common_title2\">基本信息</h3>\n\t\t\t\t\t\t<ul class=\"user_info_list\">\n\t\t\t\t\t\t\t<li><span>用户名：</span>{{ user.username }}</li>\n                            {% if address %}\n                                <li><span>联系方式：</span>{{ address.phone }}</li>\n                                <li><span>联系地址：</span>{{ address.addr }}</li>\n                            {% else %}\n                                <li><span>联系方式：</span>无默认</li>\n\t\t\t\t\t\t\t    <li><span>联系地址：</span>无默认</li>\n                            {% endif %}\n\t\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<h3 class=\"common_title2\">最近浏览</h3>\n\t\t\t\t<div class=\"has_view_list\">\n\t\t\t\t\t<ul class=\"goods_type_list clearfix\">\n                        {% for goods in goods_li %}\n\t\t\t\t        <li>\n                            <a href=\"{% url 'goods:detail' goods.id %}\"><img src=\"{{ goods.image.url }}\"></a>\n                            <h4><a href=\"{% url 'goods:detail' goods.id %}\">{{ goods.name }}</a></h4>\n                            <div class=\"operate\">\n                                <span class=\"prize\">￥{{ goods.price }}</span>\n                                <span class=\"unit\">{{ goods.price }}/{{ goods.unite }}</span>\n                                <a href=\"#\" class=\"add_goods\" title=\"加入购物车\"></a>\n                            </div>\n                        </li>\n                        {% empty %}\n                            无历史浏览记录\n                        {% endfor %}\n\t\t\t        </ul>\n\t\t        </div>\n\t\t</div>\n{% endblock right_content %}\n"
  },
  {
    "path": "dailyfresh/templates/user_center_order.html",
    "content": "{% extends 'base_user_center.html' %}\n{% load staticfiles %}\n{% block right_content %}\n\t\t<div class=\"right_content clearfix\">\n                {% csrf_token %}\n\t\t\t\t<h3 class=\"common_title2\">全部订单</h3>\n                {% for order in order_page %}\n\t\t\t\t<ul class=\"order_list_th w978 clearfix\">\n\t\t\t\t\t<li class=\"col01\">{{ order.create_time }}</li>\n\t\t\t\t\t<li class=\"col02\">订单号：{{ order.order_id }}</li>\n\t\t\t\t\t<li class=\"col02 stress\">{{ order.status_name }}</li>\n\t\t\t\t</ul>\n\n\t\t\t\t<table class=\"order_list_table w980\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\"55%\">\n                                {% for order_sku in order.order_skus %}\n\t\t\t\t\t\t\t\t<ul class=\"order_goods_list clearfix\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<li class=\"col01\"><img src=\"{{ order_sku.sku.image.url }}\"></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col02\">{{ order_sku.sku.name }}<em>{{ order_sku.price }}元/{{ order_sku.sku.unite }}</em></li>\n\t\t\t\t\t\t\t\t\t<li class=\"col03\">{{ order_sku.count }}</li>\n\t\t\t\t\t\t\t\t\t<li class=\"col04\">{{ order_sku.amount }}元</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t{% endfor %}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td width=\"15%\">{{ order.total_price|add:order.transit_price }}(含运费:{{ order.transit_price }})元</td>\n\t\t\t\t\t\t\t<td width=\"15%\">{{ order.status_name }}</td>\n\t\t\t\t\t\t\t<td width=\"15%\"><a href=\"#\" order_id=\"{{ order.order_id }}\" status=\"{{ order.order_status }}\" class=\"oper_btn\">去付款</a></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t{% endfor %}\n\t\t\t\t<div class=\"pagenation\">\n                    {% if order_page.has_previous_page %}\n\t\t\t\t\t<a href=\"{% url 'user:order' order_page.previous_page_number %}\"><上一页</a>\n                    {% endif %}\n                    {% for pindex in pages %}\n                        {% if pindex == order_page.number %}\n\t\t\t\t\t        <a href=\"{% url 'user:order' pindex %}\" class=\"active\">{{ pindex }}</a>\n                        {% else %}\n\t\t\t\t\t        <a href=\"{% url 'user:order' pindex %}\">{{ pindex }}</a>\n                        {% endif %}\n\t\t\t\t\t{% endfor %}\n                    {% if order_page.has_next_page %}\n\t\t\t\t\t<a href=\"{% url 'user:order' order_page.next_page_number %}\">下一页></a>\n                    {% endif %}\n\t\t\t\t</div>\n\t\t</div>\n{% endblock right_content %}\n{% block bottomfiles %}\n    <script src=\"{% static 'js/jquery-1.12.4.min.js' %}\"></script>\n    <script>\n    $('.oper_btn').each(function () {\n        // 获取支付状态\n        status = $(this).attr('status')\n        if (status == 1){\n            $(this).text('去支付')\n        }\n        else if (status == 4){\n            $(this).text('去评价')\n        }\n        else if (status == 5){\n            $(this).text('已完成')\n        }\n    })\n\n    $('.oper_btn').click(function () {\n        // 获取status\n        status = $(this).attr('status')\n        // 获取订单id\n        order_id = $(this).attr('order_id')\n        if (status == 1){\n            // 进行支付\n            csrf = $('input[name=\"csrfmiddlewaretoken\"]').val()\n            // 组织参数\n            params = {'order_id':order_id, 'csrfmiddlewaretoken':csrf}\n            // 发起ajax post请求，访问/order/pay, 传递参数:order_id\n            $.post('/order/pay', params, function (data) {\n                if (data.res == 3){\n                    // 引导用户到支付页面\n                    window.open(data.pay_url)\n                    // 浏览器访问/order/check, 获取支付交易的结果\n                    // ajax post 传递参数:order_id\n                    $.post('/order/check', params, function (data){\n                        if (data.res == 3){\n                            alert('支付成功')\n                            // 刷新页面\n                            location.reload()\n                        }\n                        else{\n                            alert(data.errmsg)\n                        }\n                    })\n                }\n                else{\n                    alert(data.errmsg)\n                }\n            })\n        }\n        else if (status == 4){\n            // 其他情况\n            // 跳转到评价页面\n            location.href = '/order/comment/'+order_id\n        }\n    })\n    </script>\n{% endblock bottomfiles %}"
  },
  {
    "path": "dailyfresh/templates/user_center_site.html",
    "content": "{% extends 'base_user_center.html' %}\n{% load staticfiles %}\n{% block right_content %}\n\t\t<div class=\"right_content clearfix\">\n\t\t\t\t<h3 class=\"common_title2\">收货地址</h3>\n\t\t\t\t<div class=\"site_con\">\n\t\t\t\t\t<dl>\n\t\t\t\t\t\t<dt>当前地址：</dt>\n                        {% if address %}\n\t\t\t\t\t\t    <dd><input type=\"radio\" name=\"addr\"><label>{{ address.addr }} （{{ address.receiver }} 收） {{ address.phone }}</label></dd>\n\t\t\t\t\t    {% else %}\n                            <dd>无默认地址</dd>\n                        {% endif %}\n                    </dl>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"common_title2\">编辑地址</h3>\n\t\t\t\t<div class=\"site_con\">\n\t\t\t\t\t<form method=\"post\">\n                        {% csrf_token %}\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>收件人：</label>\n\t\t\t\t\t\t\t<input type=\"text\" id=\"receiver\" name=\"receiver\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group form_group2\">\n\t\t\t\t\t\t\t<label>详细地址：</label>\n\t\t\t\t\t\t\t<textarea class=\"site_area\" id=\"addr\" name=\"addr\"></textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>邮编：</label>\n\t\t\t\t\t\t\t<input type=\"text\" id=\"zip_code\" name=\"zip_code\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form_group\">\n\t\t\t\t\t\t\t<label>手机：</label>\n\t\t\t\t\t\t\t<input type=\"text\" id=\"phone\" name=\"phone\">\n\t\t\t\t\t\t</div>\n                        <input type=\"hidden\" id=\"addr_id\" name=\"addr_id\" value=\"0\">\n                        <input type=\"hidden\" id=\"type\" name=\"type\" value=\"change\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"提交\" class=\"info_submit\">\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t</div>\n{% endblock right_content %}\n"
  },
  {
    "path": "dailyfresh/utils/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/utils/fdfs/__init__.py",
    "content": ""
  },
  {
    "path": "dailyfresh/utils/fdfs/client.conf",
    "content": "# connect timeout in seconds\n# default value is 30s\nconnect_timeout=30\n\n# network timeout in seconds\n# default value is 30s\nnetwork_timeout=60\n\n# the base path to store log files\nbase_path=/home/hnz/Desktop\n\n# tracker_server can ocur more than once, and tracker_server format is\n#  \"host:port\", host can be hostname or ip address\ntracker_server=192.168.31.89:22122\n\n#standard log level as syslog, case insensitive, value list:\n### emerg for emergency\n### alert\n### crit for critical\n### error\n### warn for warning\n### notice\n### info\n### debug\nlog_level=info\n\n# if use connection pool\n# default value is false\n# since V4.05\nuse_connection_pool = false\n\n# connections whose the idle time exceeds this time will be closed\n# unit: second\n# default value is 3600\n# since V4.05\nconnection_pool_max_idle_time = 3600\n\n# if load FastDFS parameters from tracker server\n# since V4.05\n# default value is false\nload_fdfs_parameters_from_tracker=false\n\n# if use storage ID instead of IP address\n# same as tracker.conf\n# valid only when load_fdfs_parameters_from_tracker is false\n# default value is false\n# since V4.05\nuse_storage_id = false\n\n# specify storage ids filename, can use relative or absolute path\n# same as tracker.conf\n# valid only when load_fdfs_parameters_from_tracker is false\n# since V4.05\nstorage_ids_filename = storage_ids.conf\n\n\n#HTTP settings\nhttp.tracker_server_port=80\n\n#use \"#include\" directive to include HTTP other settiongs\n##include http.conf\n"
  },
  {
    "path": "dailyfresh/utils/fdfs/storage.py",
    "content": "from django.core.files.storage import Storage\nfrom django.conf import settings\nfrom fdfs_client.client import Fdfs_client\n\n\nclass FDFSStorage(Storage):\n    '''fast dfs文件存储类'''\n    def __init__(self, client_conf=None, base_url=None):\n        '''初始化'''\n        if client_conf is None:\n            client_conf = settings.FDFS_CLIENT_CONF\n        self.client_conf = client_conf\n\n        if base_url is None:\n            base_url = settings.FDFS_URL\n        self.base_url = base_url\n\n    def _open(self, name, mode='rb'):\n        '''打开文件时使用'''\n        pass\n\n    def _save(self, name, content):\n        '''保存文件时使用'''\n        # name:你选择上传文件的名字 test.jpg\n        # content:包含你上传文件内容的File对象\n\n        # 创建一个Fdfs_client对象\n        client = Fdfs_client(self.client_conf)\n\n        # 上传文件到fast dfs系统中\n        res = client.upload_by_buffer(content.read())\n\n        # dict\n        # {\n        #     'Group name': group_name,\n        #     'Remote file_id': remote_file_id,\n        #     'Status': 'Upload successed.',\n        #     'Local file name': '',\n        #     'Uploaded size': upload_size,\n        #     'Storage IP': storage_ip\n        # }\n        if res.get('Status') != 'Upload successed.':\n            # 上传失败\n            raise Exception('上传文件到fast dfs失败')\n\n        # 获取返回的文件ID\n        filename = res.get('Remote file_id')\n\n        return filename\n\n    # 1.jpg\n    def exists(self, name):\n        '''Django判断文件名是否可用'''\n        return False\n\n    def url(self, name):\n        '''返回访问文件的url路径'''\n        return self.base_url+name\n\n\n\n"
  },
  {
    "path": "dailyfresh/utils/mixin.py",
    "content": "from django.contrib.auth.decorators import login_required\n\n\nclass LoginRequiredMixin(object):\n    @classmethod\n    def as_view(cls, **initkwargs):\n        # 调用父类的as_view\n        view = super(LoginRequiredMixin, cls).as_view(**initkwargs)\n        return login_required(view)"
  },
  {
    "path": "dailyfresh/uwsgi.ini",
    "content": "[uwsgi]\n#使用nginx连接时使用\nsocket=127.0.0.1:8080\n#直接做web服务器使用 python manage.py runserver ip:port\n#http=127.0.0.1:8080\n#项目目录\nchdir=/home/hnz/py/dailyfresh\n#项目中wsgi.py文件的目录，相对于项目目录\nwsgi-file=dailyfresh/wsgi.py\n#指定启动的工作进程数\nprocesses=4\n#指定工作进程中的线程数\nthreads=2\nmaster=True\n#保存启动之后主进程的pid\npidfile=uwsgi.pid\n#设置uwsgi后台运行，uwsgi.log保存日志信息\ndaemonize=uwsgi.log\n#设置虚拟环境的路径\nvirtualenv=/home/hnz/.virtualenvs/pytest"
  },
  {
    "path": "dailyfresh/uwsgi.log",
    "content": "*** Starting uWSGI 2.0.15 (64bit) on [Sat Nov 25 16:07:56 2017] ***\ncompiled with version: 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1) on 30 October 2017 06:31:19\nos: Darwin-15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64\nnodename: smartli.local\nmachine: x86_64\nclock source: unix\ndetected number of CPU cores: 8\ncurrent working directory: /Users/smart/Desktop/dj/bj18/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /Users/smart/.virtualenvs/dailyfresh/bin/uwsgi\n!!! no internal routing support, rebuild with pcre support !!!\nchdir() to /Users/smart/Desktop/dj/bj18/dailyfresh\nyour processes number limit is 709\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 10240\nlock engine: OSX spinlocks\nthunder lock: disabled (you can enable it with --thunder-lock)\nuWSGI http bound on 127.0.0.1:8080 fd 4\nuwsgi socket 0 bound to TCP address 127.0.0.1:55958 (port auto-assigned) fd 3\nPython version: 3.5.2 (default, Oct 21 2017, 11:45:19)  [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]\nSet PythonHome to /Users/smart/.virtualenvs/dailyfresh\nPython main interpreter initialized at 0x7fc848d02940\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 415200 bytes (405 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x7fc848d02940 pid: 7154 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 7154)\nspawned uWSGI worker 1 (pid: 7155, cores: 2)\nspawned uWSGI worker 2 (pid: 7156, cores: 2)\nspawned uWSGI worker 3 (pid: 7157, cores: 2)\nspawned uWSGI worker 4 (pid: 7158, cores: 2)\nspawned uWSGI http 1 (pid: 7159)\n设置缓存\n[pid: 7156|app: 0|req: 1/1] 127.0.0.1 () {38 vars in 749 bytes} [Sat Nov 25 16:08:59 2017] GET /index => generated 13323 bytes in 463 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 7156|app: 0|req: 2/2] 127.0.0.1 () {38 vars in 717 bytes} [Sat Nov 25 16:09:00 2017] GET /static/js/jquery-ui.min.js => generated 100 bytes in 2 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\n[pid: 7155|app: 0|req: 1/3] 127.0.0.1 () {38 vars in 718 bytes} [Sat Nov 25 16:09:00 2017] GET /static/css/main.css => generated 93 bytes in 317 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 1)\n[pid: 7157|app: 0|req: 1/4] 127.0.0.1 () {38 vars in 720 bytes} [Sat Nov 25 16:09:00 2017] GET /static/css/reset.css => generated 94 bytes in 319 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 7158|app: 0|req: 2/5] 127.0.0.1 () {38 vars in 701 bytes} [Sat Nov 25 16:09:00 2017] GET /static/js/slide.js => generated 92 bytes in 319 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\n[pid: 7158|app: 0|req: 2/6] 127.0.0.1 () {38 vars in 725 bytes} [Sat Nov 25 16:09:00 2017] GET /static/js/jquery-1.12.4.min.js => generated 104 bytes in 319 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 1)\n[pid: 7156|app: 0|req: 4/7] 127.0.0.1 () {38 vars in 717 bytes} [Sat Nov 25 16:09:00 2017] GET /static/js/jquery-ui.min.js => generated 100 bytes in 1 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\n[pid: 7156|app: 0|req: 4/8] 127.0.0.1 () {38 vars in 745 bytes} [Sat Nov 25 16:09:00 2017] GET /static/images/logo.png => generated 96 bytes in 3 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 7158|app: 0|req: 3/9] 127.0.0.1 () {38 vars in 701 bytes} [Sat Nov 25 16:09:00 2017] GET /static/js/slide.js => generated 92 bytes in 1 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\ngateway \"uWSGI http 1\" has been buried (pid: 7159)\nworker 4 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 1 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.15 (64bit) on [Sat Nov 25 16:25:54 2017] ***\ncompiled with version: 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1) on 30 October 2017 06:31:19\nos: Darwin-15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64\nnodename: smartli.local\nmachine: x86_64\nclock source: unix\ndetected number of CPU cores: 8\ncurrent working directory: /Users/smart/Desktop/dj/bj18/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /Users/smart/.virtualenvs/dailyfresh/bin/uwsgi\n!!! no internal routing support, rebuild with pcre support !!!\nchdir() to /Users/smart/Desktop/dj/bj18/dailyfresh\nyour processes number limit is 709\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 10240\nlock engine: OSX spinlocks\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Oct 21 2017, 11:45:19)  [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]\nSet PythonHome to /Users/smart/.virtualenvs/dailyfresh\nPython main interpreter initialized at 0x7fb9d8c0a070\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 415200 bytes (405 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7fb9d8c0a070 pid: 7453 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 7453)\nspawned uWSGI worker 1 (pid: 7454, cores: 2)\nspawned uWSGI worker 2 (pid: 7455, cores: 2)\nspawned uWSGI worker 3 (pid: 7456, cores: 2)\nspawned uWSGI worker 4 (pid: 7457, cores: 2)\n[pid: 7456|app: 0|req: 1/1] 127.0.0.1 () {40 vars in 775 bytes} [Sat Nov 25 16:26:44 2017] GET /index => generated 13323 bytes in 436 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 7456|app: 0|req: 2/2] 127.0.0.1 () {44 vars in 831 bytes} [Sat Nov 25 16:26:45 2017] GET /static/js/jquery-ui.min.js => generated 100 bytes in 2 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\n[pid: 7454|app: 0|req: 1/4] 127.0.0.1 () {44 vars in 832 bytes} [Sat Nov 25 16:26:45 2017] GET /static/css/reset.css => generated 94 bytes in 312 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 7455|app: 0|req: 1/4] 127.0.0.1 () {44 vars in 839 bytes} [Sat Nov 25 16:26:45 2017] GET /static/js/jquery-1.12.4.min.js => generated 104 bytes in 312 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 1)\n[pid: 7457|app: 0|req: 2/5] 127.0.0.1 () {44 vars in 831 bytes} [Sat Nov 25 16:26:45 2017] GET /static/css/main.css => generated 93 bytes in 314 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 7457|app: 0|req: 2/6] 127.0.0.1 () {44 vars in 813 bytes} [Sat Nov 25 16:26:45 2017] GET /static/js/slide.js => generated 92 bytes in 314 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 7457|app: 0|req: 4/7] 127.0.0.1 () {40 vars in 738 bytes} [Sat Nov 25 16:26:45 2017] GET /static/js/jquery-ui.min.js => generated 100 bytes in 1 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 1)\n[pid: 7457|app: 0|req: 4/8] 127.0.0.1 () {44 vars in 858 bytes} [Sat Nov 25 16:26:45 2017] GET /static/images/logo.png => generated 96 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 80 bytes (2 switches on core 0)\n[pid: 7457|app: 0|req: 5/9] 127.0.0.1 () {40 vars in 722 bytes} [Sat Nov 25 16:26:45 2017] GET /static/js/slide.js => generated 92 bytes in 1 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 7457|app: 0|req: 6/10] 127.0.0.1 () {42 vars in 806 bytes} [Sat Nov 25 16:49:14 2017] GET /index => generated 13323 bytes in 139 msecs (HTTP/1.1 200) 3 headers in 102 bytes (2 switches on core 0)\n[pid: 7457|app: 0|req: 7/11] 127.0.0.1 () {40 vars in 775 bytes} [Sat Nov 25 17:05:07 2017] GET /index => generated 13323 bytes in 84 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 7454|app: 0|req: 2/12] 127.0.0.1 () {42 vars in 817 bytes} [Sat Nov 25 17:18:53 2017] GET /goods/6 => generated 9329 bytes in 114 msecs (HTTP/1.1 200) 4 headers in 224 bytes (2 switches on core 1)\n[pid: 7457|app: 0|req: 8/13] 127.0.0.1 () {42 vars in 819 bytes} [Sat Nov 25 17:19:10 2017] GET /goods/9 => generated 9330 bytes in 22 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 7455|app: 0|req: 2/14] 127.0.0.1 () {42 vars in 815 bytes} [Sat Nov 25 18:27:39 2017] GET /cart/ => generated 10865 bytes in 33 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 7454|app: 0|req: 3/15] 127.0.0.1 () {42 vars in 815 bytes} [Sat Nov 25 18:27:46 2017] GET /cart/ => generated 11558 bytes in 15 msecs (HTTP/1.1 200) 4 headers in 224 bytes (2 switches on core 0)\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 19:30:12 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuWSGI http bound on 127.0.0.1:8080 fd 4\nuwsgi socket 0 bound to TCP address 127.0.0.1:38167 (port auto-assigned) fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x26c8770\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x26c8770 pid: 2306 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2306)\nspawned uWSGI worker 1 (pid: 2308, cores: 2)\nspawned uWSGI worker 2 (pid: 2309, cores: 2)\nspawned uWSGI worker 3 (pid: 2311, cores: 2)\nspawned uWSGI worker 4 (pid: 2313, cores: 2)\nspawned uWSGI http 1 (pid: 2314)\n[pid: 2311|app: 0|req: 1/1] 127.0.0.1 () {38 vars in 721 bytes} [Sun May 26 19:31:19 2019] GET /index => generated 27 bytes in 9569 msecs (HTTP/1.1 500) 2 headers in 92 bytes (1 switches on core 0)\n[pid: 2311|app: 0|req: 2/2] 127.0.0.1 () {36 vars in 649 bytes} [Sun May 26 19:31:29 2019] GET /favicon.ico => generated 85 bytes in 4 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 2309|app: 0|req: 1/3] 127.0.0.1 () {38 vars in 709 bytes} [Sun May 26 19:32:07 2019] GET / => generated 74 bytes in 484 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 2313|app: 0|req: 1/4] 127.0.0.1 () {38 vars in 710 bytes} [Sun May 26 19:32:24 2019] GET / => generated 74 bytes in 638 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 2311|app: 0|req: 3/5] 127.0.0.1 () {38 vars in 720 bytes} [Sun May 26 19:32:30 2019] GET /index => generated 27 bytes in 4 msecs (HTTP/1.1 500) 2 headers in 92 bytes (1 switches on core 0)\n[pid: 2309|app: 0|req: 2/6] 127.0.0.1 () {38 vars in 720 bytes} [Sun May 26 19:32:34 2019] GET /admin => generated 0 bytes in 2 msecs (HTTP/1.1 301) 3 headers in 143 bytes (1 switches on core 1)\n[pid: 2313|app: 0|req: 2/7] 127.0.0.1 () {38 vars in 722 bytes} [Sun May 26 19:32:34 2019] GET /admin/ => generated 27 bytes in 253 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 2311|app: 0|req: 4/8] 127.0.0.1 () {38 vars in 721 bytes} [Sun May 26 19:37:09 2019] GET /index => generated 27 bytes in 21 msecs (HTTP/1.1 500) 2 headers in 92 bytes (1 switches on core 1)\nSIGINT/SIGQUIT received...killing workers...\ngateway \"uWSGI http 1\" has been buried (pid: 2314)\nworker 1 buried after 2 seconds\nworker 2 buried after 2 seconds\nworker 3 buried after 2 seconds\nworker 4 buried after 2 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 19:42:24 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuWSGI http bound on 127.0.0.1:8080 fd 4\nuwsgi socket 0 bound to TCP address 127.0.0.1:42187 (port auto-assigned) fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x1c0e770\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 5 seconds on interpreter 0x1c0e770 pid: 2773 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2773)\nspawned uWSGI worker 1 (pid: 2778, cores: 2)\nspawned uWSGI worker 2 (pid: 2780, cores: 2)\nspawned uWSGI worker 3 (pid: 2782, cores: 2)\nspawned uWSGI worker 4 (pid: 2783, cores: 2)\nspawned uWSGI http 1 (pid: 2785)\n[pid: 2782|app: 0|req: 1/1] 127.0.0.1 () {40 vars in 752 bytes} [Sun May 26 19:42:42 2019] GET /index => generated 27 bytes in 2885 msecs (HTTP/1.1 500) 2 headers in 92 bytes (1 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\ngateway \"uWSGI http 1\" has been buried (pid: 2785)\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 20:07:52 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x11e0680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x11e0680 pid: 3109 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3109)\nspawned uWSGI worker 1 (pid: 3111, cores: 2)\nspawned uWSGI worker 2 (pid: 3112, cores: 2)\nspawned uWSGI worker 3 (pid: 3114, cores: 2)\nspawned uWSGI worker 4 (pid: 3117, cores: 2)\n[pid: 3111|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 763 bytes} [Sun May 26 20:08:11 2019] GET / => generated 74 bytes in 3515 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n设置缓存\n[pid: 3111|app: 0|req: 2/2] 127.0.0.1 () {40 vars in 742 bytes} [Sun May 26 20:08:17 2019] GET /index => generated 27 bytes in 5256 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 3117|app: 0|req: 1/3] 127.0.0.1 () {40 vars in 742 bytes} [Sun May 26 20:09:43 2019] GET /index => generated 27 bytes in 711 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\ninvalid request block size: 21573 (max 4096)...skip\n[pid: 3117|app: 0|req: 2/4] 127.0.0.1 () {40 vars in 742 bytes} [Sun May 26 20:10:01 2019] GET /index => generated 27 bytes in 128 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\n[pid: 3117|app: 0|req: 3/5] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 20:15:28 2019] GET /index => generated 27 bytes in 154 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 3117|app: 0|req: 4/6] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 20:15:29 2019] GET /index => generated 27 bytes in 165 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 20:16:37 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x15ef680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 7 seconds on interpreter 0x15ef680 pid: 3261 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3261)\nspawned uWSGI worker 1 (pid: 3267, cores: 2)\nspawned uWSGI worker 2 (pid: 3269, cores: 2)\nspawned uWSGI worker 3 (pid: 3271, cores: 2)\nspawned uWSGI worker 4 (pid: 3273, cores: 2)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 817, in _resolve_lookup\n    current = current[bit]\nTypeError: 'ImageFieldFile' object is not subscriptable\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 132, in get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/generic/base.py\", line 71, in view\n    return self.dispatch(request, *args, **kwargs)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/generic/base.py\", line 89, in dispatch\n    return handler(request, *args, **kwargs)\n  File \"/home/hnz/py/dailyfresh/apps/goods/views.py\", line 71, in get\n    return render(request, 'index.html', context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/shortcuts.py\", line 67, in render\n    template_name, context, request=request, using=using)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader.py\", line 99, in render_to_string\n    return template.render(context, request)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/backends/django.py\", line 74, in render\n    return self.template.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 209, in render\n    return self._render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 201, in _render\n    return self.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader_tags.py\", line 135, in render\n    return compiled_parent._render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 201, in _render\n    return self.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader_tags.py\", line 65, in render\n    result = block.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/defaulttags.py\", line 217, in render\n    nodelist.append(node.render(context))\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 89, in render\n    output = self.filter_expression.resolve(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 647, in resolve\n    obj = self.var.resolve(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 787, in resolve\n    value = self._resolve_lookup(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 825, in _resolve_lookup\n    current = getattr(current, bit)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/db/models/fields/files.py\", line 69, in _get_url\n    return self.storage.url(self.name)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/functional.py\", line 226, in inner\n    self._setup()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 334, in _setup\n    self._wrapped = get_storage_class()()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 329, in get_storage_class\n    return import_string(import_path or settings.DEFAULT_FILE_STORAGE)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/module_loading.py\", line 26, in import_string\n    module = import_module(module_path)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 958, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"./utils/fdfs/storage.py\", line 3, in <module>\n    from fdfs_client.client import Fdfs_client\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/client.py\", line 11, in <module>\n    from fdfs_client.tracker_client import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/tracker_client.py\", line 17, in <module>\n    from fdfs_client.utils import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/utils.py\", line 8, in <module>\n    from mutagen._compat import StringIO\nImportError: No module named 'mutagen'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/wsgi.py\", line 189, in __call__\n    response = self.get_response(request)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 218, in get_response\n    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 261, in handle_uncaught_exception\n    return debug.technical_500_response(request, *exc_info)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 97, in technical_500_response\n    html = reporter.get_traceback_html()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 383, in get_traceback_html\n    c = Context(self.get_traceback_data(), use_l10n=False)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 328, in get_traceback_data\n    frames = self.get_traceback_frames()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 501, in get_traceback_frames\n    'vars': self.filter.get_traceback_frame_variables(self.request, tb.tb_frame),\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 234, in get_traceback_frame_variables\n    cleansed[name] = self.cleanse_special_types(request, value)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 189, in cleanse_special_types\n    if isinstance(value, HttpRequest):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/functional.py\", line 226, in inner\n    self._setup()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 334, in _setup\n    self._wrapped = get_storage_class()()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 329, in get_storage_class\n    return import_string(import_path or settings.DEFAULT_FILE_STORAGE)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/module_loading.py\", line 26, in import_string\n    module = import_module(module_path)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 958, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"./utils/fdfs/storage.py\", line 3, in <module>\n    from fdfs_client.client import Fdfs_client\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/client.py\", line 11, in <module>\n    from fdfs_client.tracker_client import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/tracker_client.py\", line 17, in <module>\n    from fdfs_client.utils import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/utils.py\", line 8, in <module>\n    from mutagen._compat import StringIO\nImportError: No module named 'mutagen'\n[pid: 3267|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 20:16:44 2019] GET /index => generated 0 bytes in 1273 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 20:23:31 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x22c7680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x22c7680 pid: 3537 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3537)\nspawned uWSGI worker 1 (pid: 3539, cores: 2)\nspawned uWSGI worker 2 (pid: 3541, cores: 2)\nspawned uWSGI worker 3 (pid: 3543, cores: 2)\nspawned uWSGI worker 4 (pid: 3545, cores: 2)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 817, in _resolve_lookup\n    current = current[bit]\nTypeError: 'ImageFieldFile' object is not subscriptable\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 132, in get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/generic/base.py\", line 71, in view\n    return self.dispatch(request, *args, **kwargs)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/generic/base.py\", line 89, in dispatch\n    return handler(request, *args, **kwargs)\n  File \"/home/hnz/py/dailyfresh/apps/goods/views.py\", line 71, in get\n    return render(request, 'index.html', context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/shortcuts.py\", line 67, in render\n    template_name, context, request=request, using=using)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader.py\", line 99, in render_to_string\n    return template.render(context, request)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/backends/django.py\", line 74, in render\n    return self.template.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 209, in render\n    return self._render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 201, in _render\n    return self.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader_tags.py\", line 135, in render\n    return compiled_parent._render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 201, in _render\n    return self.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/loader_tags.py\", line 65, in render\n    result = block.nodelist.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 903, in render\n    bit = self.render_node(node, context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 79, in render_node\n    return node.render(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/defaulttags.py\", line 217, in render\n    nodelist.append(node.render(context))\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/debug.py\", line 89, in render\n    output = self.filter_expression.resolve(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 647, in resolve\n    obj = self.var.resolve(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 787, in resolve\n    value = self._resolve_lookup(context)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/template/base.py\", line 825, in _resolve_lookup\n    current = getattr(current, bit)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/db/models/fields/files.py\", line 69, in _get_url\n    return self.storage.url(self.name)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/functional.py\", line 226, in inner\n    self._setup()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 334, in _setup\n    self._wrapped = get_storage_class()()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 329, in get_storage_class\n    return import_string(import_path or settings.DEFAULT_FILE_STORAGE)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/module_loading.py\", line 26, in import_string\n    module = import_module(module_path)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 958, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"./utils/fdfs/storage.py\", line 3, in <module>\n    from fdfs_client.client import Fdfs_client\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/client.py\", line 11, in <module>\n    from fdfs_client.tracker_client import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/tracker_client.py\", line 17, in <module>\n    from fdfs_client.utils import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/utils.py\", line 10, in <module>\n    from requests.compat import basestring\nImportError: No module named 'requests'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/wsgi.py\", line 189, in __call__\n    response = self.get_response(request)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 218, in get_response\n    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/handlers/base.py\", line 261, in handle_uncaught_exception\n    return debug.technical_500_response(request, *exc_info)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 97, in technical_500_response\n    html = reporter.get_traceback_html()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 383, in get_traceback_html\n    c = Context(self.get_traceback_data(), use_l10n=False)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 328, in get_traceback_data\n    frames = self.get_traceback_frames()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 501, in get_traceback_frames\n    'vars': self.filter.get_traceback_frame_variables(self.request, tb.tb_frame),\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 234, in get_traceback_frame_variables\n    cleansed[name] = self.cleanse_special_types(request, value)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/views/debug.py\", line 189, in cleanse_special_types\n    if isinstance(value, HttpRequest):\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/functional.py\", line 226, in inner\n    self._setup()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 334, in _setup\n    self._wrapped = get_storage_class()()\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/core/files/storage.py\", line 329, in get_storage_class\n    return import_string(import_path or settings.DEFAULT_FILE_STORAGE)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django/utils/module_loading.py\", line 26, in import_string\n    module = import_module(module_path)\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 958, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"./utils/fdfs/storage.py\", line 3, in <module>\n    from fdfs_client.client import Fdfs_client\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/client.py\", line 11, in <module>\n    from fdfs_client.tracker_client import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/tracker_client.py\", line 17, in <module>\n    from fdfs_client.utils import *\n  File \"/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/fdfs_client/utils.py\", line 10, in <module>\n    from requests.compat import basestring\nImportError: No module named 'requests'\n[pid: 3541|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 20:23:43 2019] GET /index => generated 0 bytes in 1202 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 20:25:37 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x152f680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x152f680 pid: 3616 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3616)\nspawned uWSGI worker 1 (pid: 3618, cores: 2)\nspawned uWSGI worker 2 (pid: 3619, cores: 2)\nspawned uWSGI worker 3 (pid: 3622, cores: 2)\nspawned uWSGI worker 4 (pid: 3624, cores: 2)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3624|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 20:25:41 2019] GET /index => generated 13143 bytes in 2423 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3624|app: 0|req: 2/2] 192.168.31.195 () {38 vars in 651 bytes} [Sun May 26 20:26:35 2019] GET / => generated 3014 bytes in 11 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n[pid: 3622|app: 0|req: 1/3] 192.168.31.195 () {38 vars in 629 bytes} [Sun May 26 20:26:37 2019] GET /favicon.ico => generated 3047 bytes in 462 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 3624|app: 0|req: 3/4] 192.168.31.195 () {38 vars in 661 bytes} [Sun May 26 20:26:44 2019] GET /index => generated 13136 bytes in 374 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 20:27:25 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x2516680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x2516680 pid: 3723 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3723)\nspawned uWSGI worker 1 (pid: 3725, cores: 2)\nspawned uWSGI worker 2 (pid: 3727, cores: 2)\nspawned uWSGI worker 3 (pid: 3729, cores: 2)\nspawned uWSGI worker 4 (pid: 3731, cores: 2)\n[pid: 3731|app: 0|req: 1/1] 192.168.31.195 () {40 vars in 692 bytes} [Sun May 26 20:27:28 2019] GET /index => generated 13136 bytes in 852 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3729|app: 0|req: 1/2] 192.168.31.195 () {40 vars in 707 bytes} [Sun May 26 20:27:40 2019] GET /goods/1 => generated 9446 bytes in 1686 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 2/3] 192.168.31.195 () {40 vars in 718 bytes} [Sun May 26 20:27:57 2019] GET /index => generated 13136 bytes in 281 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 3/4] 192.168.31.195 () {42 vars in 749 bytes} [Sun May 26 21:07:43 2019] GET /index => generated 13136 bytes in 7623 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 4/5] 192.168.31.195 () {40 vars in 718 bytes} [Sun May 26 21:09:23 2019] GET /admin => generated 0 bytes in 1 msecs (HTTP/1.1 301) 3 headers in 142 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 5/6] 192.168.31.195 () {40 vars in 720 bytes} [Sun May 26 21:09:23 2019] GET /admin/ => generated 0 bytes in 199 msecs (HTTP/1.1 302) 7 headers in 275 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 6/7] 192.168.31.195 () {40 vars in 757 bytes} [Sun May 26 21:09:23 2019] GET /admin/login/?next=/admin/ => generated 1917 bytes in 388 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 7/8] 192.168.31.195 () {50 vars in 1000 bytes} [Sun May 26 21:09:30 2019] POST /admin/login/?next=/admin/ => generated 0 bytes in 661 msecs (HTTP/1.1 302) 9 headers in 509 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 8/9] 192.168.31.195 () {44 vars in 857 bytes} [Sun May 26 21:09:31 2019] GET /admin/ => generated 4637 bytes in 471 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 9/10] 192.168.31.195 () {42 vars in 861 bytes} [Sun May 26 21:09:42 2019] GET /admin/goods/indexpromotionbanner/ => generated 4738 bytes in 303 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3725|app: 0|req: 1/11] 192.168.31.195 () {40 vars in 731 bytes} [Sun May 26 21:09:42 2019] GET /admin/jsi18n/ => generated 6776 bytes in 1079 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3729|app: 0|req: 2/12] 192.168.31.195 () {42 vars in 892 bytes} [Sun May 26 21:09:45 2019] GET /admin/goods/indexpromotionbanner/2/ => generated 6390 bytes in 303 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3727|app: 0|req: 1/13] 192.168.31.195 () {40 vars in 733 bytes} [Sun May 26 21:09:45 2019] GET /admin/jsi18n/ => generated 6776 bytes in 798 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3727|app: 0|req: 2/14] 192.168.31.195 () {44 vars in 945 bytes} [Sun May 26 21:10:20 2019] GET /admin/goods/indexpromotionbanner/ => generated 4738 bytes in 7044 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 10/15] 192.168.31.195 () {40 vars in 731 bytes} [Sun May 26 21:10:27 2019] GET /admin/jsi18n/ => generated 6776 bytes in 5534 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3725|app: 0|req: 2/16] 192.168.31.195 () {40 vars in 752 bytes} [Sun May 26 21:10:54 2019] GET / => generated 74 bytes in 37 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n设置缓存\n[pid: 3731|app: 0|req: 11/17] 192.168.31.195 () {40 vars in 762 bytes} [Sun May 26 21:10:59 2019] GET /index => generated 13143 bytes in 522 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 12/18] 192.168.31.195 () {42 vars in 846 bytes} [Sun May 26 21:11:51 2019] GET /admin/goods/ => generated 3824 bytes in 63 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3729|app: 0|req: 3/19] 192.168.31.195 () {42 vars in 867 bytes} [Sun May 26 21:11:54 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13019 bytes in 161 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 13/20] 192.168.31.195 () {40 vars in 731 bytes} [Sun May 26 21:11:55 2019] GET /admin/jsi18n/ => generated 6776 bytes in 124 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 14/21] 192.168.31.195 () {44 vars in 901 bytes} [Sun May 26 21:11:57 2019] GET /admin/goods/ => generated 3824 bytes in 111 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3729|app: 0|req: 4/22] 192.168.31.195 () {42 vars in 859 bytes} [Sun May 26 21:11:58 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 208 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3729|app: 0|req: 5/23] 192.168.31.195 () {40 vars in 727 bytes} [Sun May 26 21:11:58 2019] GET /admin/jsi18n/ => generated 6776 bytes in 33 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3725|app: 0|req: 3/24] 192.168.31.195 () {42 vars in 880 bytes} [Sun May 26 21:12:00 2019] GET /admin/goods/indexgoodsbanner/4/ => generated 7309 bytes in 295 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3725|app: 0|req: 4/25] 192.168.31.195 () {40 vars in 729 bytes} [Sun May 26 21:12:00 2019] GET /admin/jsi18n/ => generated 6776 bytes in 121 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0aba08e240>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0aba08e1d0>\n[pid: 3729|app: 0|req: 6/26] 192.168.31.195 () {50 vars in 1139 bytes} [Sun May 26 21:13:02 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 8035 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0aba0d17f0>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0aba0d1470>\n[pid: 3731|app: 0|req: 15/27] 192.168.31.195 () {50 vars in 1139 bytes} [Sun May 26 21:13:16 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 11207 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0aba3bbbe0>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0aba3bb860>\n[pid: 3727|app: 0|req: 3/28] 192.168.31.195 () {50 vars in 1139 bytes} [Sun May 26 21:13:31 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 318 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0ab9f8b7b8>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0ab9f8b160>\n[pid: 3729|app: 0|req: 7/29] 192.168.31.195 () {50 vars in 1139 bytes} [Sun May 26 21:13:51 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 128 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\n[pid: 3725|app: 0|req: 5/30] 127.0.0.1 () {40 vars in 742 bytes} [Sun May 26 21:15:04 2019] GET /index => generated 13143 bytes in 2257 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 16/31] 127.0.0.1 () {40 vars in 742 bytes} [Sun May 26 21:15:20 2019] GET /admin => generated 0 bytes in 2 msecs (HTTP/1.1 301) 3 headers in 138 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 17/32] 127.0.0.1 () {40 vars in 744 bytes} [Sun May 26 21:15:20 2019] GET /admin/ => generated 4637 bytes in 423 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 18/33] 127.0.0.1 () {42 vars in 829 bytes} [Sun May 26 21:15:23 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 473 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3727|app: 0|req: 4/34] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 21:15:24 2019] GET /admin/jsi18n/ => generated 6776 bytes in 411 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 19/35] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 21:15:28 2019] GET /admin/goods/indexgoodsbanner/4/ => generated 7309 bytes in 655 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3727|app: 0|req: 5/36] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 21:15:28 2019] GET /admin/jsi18n/ => generated 6776 bytes in 97 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0ab9de8a90>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0ab9de86d8>\n[pid: 3731|app: 0|req: 20/37] 127.0.0.1 () {46 vars in 1085 bytes} [Sun May 26 21:19:15 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 954 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0ab9f8b978>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0ab9f8bb00>\n[pid: 3729|app: 0|req: 8/38] 127.0.0.1 () {48 vars in 1116 bytes} [Sun May 26 21:20:10 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 242 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0aba20a710>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0aba20a390>\n[pid: 3725|app: 0|req: 6/39] 127.0.0.1 () {46 vars in 1085 bytes} [Sun May 26 21:31:29 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 27 bytes in 1650 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 21/40] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 21:32:44 2019] GET /admin/ => generated 4637 bytes in 507 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 22/41] 127.0.0.1 () {44 vars in 884 bytes} [Sun May 26 21:32:50 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 368 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 23/42] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 21:32:51 2019] GET /admin/jsi18n/ => generated 6776 bytes in 343 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3729|app: 0|req: 9/43] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 21:32:54 2019] GET /admin/goods/indexgoodsbanner/3/ => generated 7309 bytes in 416 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3729|app: 0|req: 10/44] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 21:32:54 2019] GET /admin/jsi18n/ => generated 6776 bytes in 81 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 24/45] 127.0.0.1 () {44 vars in 909 bytes} [Sun May 26 21:33:01 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 152 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3731|app: 0|req: 25/46] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 21:33:01 2019] GET /admin/jsi18n/ => generated 6776 bytes in 39 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3725|app: 0|req: 7/47] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 21:33:03 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7309 bytes in 248 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3731|app: 0|req: 26/48] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 21:33:03 2019] GET /admin/jsi18n/ => generated 6776 bytes in 119 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f0ab9e0c0b8>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f0ab9e0cfd0>\n[pid: 3731|app: 0|req: 27/49] 127.0.0.1 () {46 vars in 1085 bytes} [Sun May 26 21:33:22 2019] POST /admin/goods/indexgoodsbanner/1/ => generated 27 bytes in 473 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 0)\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 22:21:06 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x1ed9710\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 8 seconds on interpreter 0x1ed9710 pid: 2615 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2615)\nspawned uWSGI worker 1 (pid: 2624, cores: 2)\nspawned uWSGI worker 2 (pid: 2625, cores: 2)\nspawned uWSGI worker 3 (pid: 2627, cores: 2)\nspawned uWSGI worker 4 (pid: 2628, cores: 2)\n设置缓存\n[pid: 2624|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:21:15 2019] GET /index => generated 13143 bytes in 10970 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 2625|app: 0|req: 1/2] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 22:21:48 2019] GET /admin/ => generated 4637 bytes in 7072 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 2627|app: 0|req: 1/3] 127.0.0.1 () {44 vars in 884 bytes} [Sun May 26 22:21:58 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 827 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 2625|app: 0|req: 2/4] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:21:59 2019] GET /admin/jsi18n/ => generated 6776 bytes in 854 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 2624|app: 0|req: 2/5] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:22:04 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7309 bytes in 566 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 2628|app: 0|req: 1/6] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:22:04 2019] GET /admin/jsi18n/ => generated 6776 bytes in 1943 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\n[-] Error: 101 connect to 192.168.31.89:22122. Network is unreachable.\nDAMN ! worker 4 (pid: 2628) died :( trying respawn ...\nRespawned uWSGI worker 4 (new pid: 2857)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 22:27:47 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x145f710\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 7 seconds on interpreter 0x145f710 pid: 2939 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2939)\nspawned uWSGI worker 1 (pid: 2944, cores: 2)\nspawned uWSGI worker 2 (pid: 2945, cores: 2)\nspawned uWSGI worker 3 (pid: 2948, cores: 2)\nspawned uWSGI worker 4 (pid: 2949, cores: 2)\n[pid: 2944|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:27:54 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7309 bytes in 3436 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 2948|app: 0|req: 1/2] 127.0.0.1 () {42 vars in 758 bytes} [Sun May 26 22:27:57 2019] GET /admin/jsi18n/ => generated 6776 bytes in 806 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 2945|app: 0|req: 1/3] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:27:57 2019] GET /index => generated 13143 bytes in 1190 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 2944|app: 0|req: 2/4] 127.0.0.1 () {46 vars in 1083 bytes} [Sun May 26 22:28:05 2019] POST /admin/goods/indexgoodsbanner/1/ => generated 27 bytes in 453 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 2949|app: 0|req: 1/5] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 22:28:23 2019] GET /admin/ => generated 4637 bytes in 873 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 2949|app: 0|req: 2/6] 127.0.0.1 () {44 vars in 884 bytes} [Sun May 26 22:28:26 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 1530 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 2948|app: 0|req: 2/7] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:28:27 2019] GET /admin/jsi18n/ => generated 6776 bytes in 787 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 2944|app: 0|req: 3/8] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:28:31 2019] GET /admin/goods/indexgoodsbanner/2/ => generated 7309 bytes in 122 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 2949|app: 0|req: 3/9] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:28:31 2019] GET /admin/jsi18n/ => generated 6776 bytes in 39 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 2944|app: 0|req: 4/10] 127.0.0.1 () {44 vars in 909 bytes} [Sun May 26 22:28:33 2019] GET /admin/goods/indexgoodsbanner/ => generated 5194 bytes in 398 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 2945|app: 0|req: 2/11] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:28:33 2019] GET /admin/jsi18n/ => generated 6776 bytes in 106 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 2948|app: 0|req: 3/12] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:28:35 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7309 bytes in 351 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 2944|app: 0|req: 5/13] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:28:35 2019] GET /admin/jsi18n/ => generated 6776 bytes in 51 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 2949|app: 0|req: 4/14] 127.0.0.1 () {46 vars in 1087 bytes} [Sun May 26 22:28:52 2019] POST /admin/goods/indexgoodsbanner/1/ => generated 27 bytes in 342 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 2949|app: 0|req: 5/15] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:30:14 2019] GET /index => generated 13143 bytes in 229 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 2949|app: 0|req: 6/16] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 22:30:29 2019] GET /admin/ => generated 4637 bytes in 127 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n[pid: 2945|app: 0|req: 3/17] 127.0.0.1 () {42 vars in 837 bytes} [Sun May 26 22:30:48 2019] GET /admin/goods/indexpromotionbanner/ => generated 4738 bytes in 164 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 2949|app: 0|req: 7/18] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:30:48 2019] GET /admin/jsi18n/ => generated 6776 bytes in 198 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 2945|app: 0|req: 4/19] 127.0.0.1 () {42 vars in 868 bytes} [Sun May 26 22:30:50 2019] GET /admin/goods/indexpromotionbanner/1/ => generated 6390 bytes in 163 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 2949|app: 0|req: 8/20] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 22:30:50 2019] GET /admin/jsi18n/ => generated 6776 bytes in 55 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 2944|app: 0|req: 6/21] 127.0.0.1 () {46 vars in 1097 bytes} [Sun May 26 22:31:00 2019] POST /admin/goods/indexpromotionbanner/1/ => generated 27 bytes in 112 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 22:35:27 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x1b49710\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x1b49710 pid: 3201 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3201)\nspawned uWSGI worker 1 (pid: 3203, cores: 2)\nspawned uWSGI worker 2 (pid: 3205, cores: 2)\nspawned uWSGI worker 3 (pid: 3207, cores: 2)\nspawned uWSGI worker 4 (pid: 3209, cores: 2)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3203|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:35:35 2019] GET /index => generated 13143 bytes in 1180 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3209|app: 0|req: 1/2] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 22:35:46 2019] GET /admin/ => generated 4637 bytes in 556 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3203|app: 0|req: 2/3] 127.0.0.1 () {44 vars in 884 bytes} [Sun May 26 22:35:49 2019] GET /admin/goods/indexgoodsbanner/ => generated 5186 bytes in 283 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3205|app: 0|req: 1/4] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:35:50 2019] GET /admin/jsi18n/ => generated 6776 bytes in 530 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3209|app: 0|req: 2/5] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:35:52 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7301 bytes in 341 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3209|app: 0|req: 3/6] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:35:52 2019] GET /admin/jsi18n/ => generated 6776 bytes in 103 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3205|app: 0|req: 2/7] 127.0.0.1 () {46 vars in 1083 bytes} [Sun May 26 22:36:00 2019] POST /admin/goods/indexgoodsbanner/1/ => generated 191715 bytes in 529 msecs (HTTP/1.1 500) 3 headers in 106 bytes (1 switches on core 1)\n[pid: 3207|app: 0|req: 1/8] 127.0.0.1 () {42 vars in 799 bytes} [Sun May 26 22:50:58 2019] GET /admin/ => generated 4637 bytes in 4023 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Sun May 26 22:52:32 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0xa93710\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 6 seconds on interpreter 0xa93710 pid: 3885 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 3885)\nspawned uWSGI worker 1 (pid: 3889, cores: 2)\nspawned uWSGI worker 2 (pid: 3891, cores: 2)\nspawned uWSGI worker 3 (pid: 3893, cores: 2)\nspawned uWSGI worker 4 (pid: 3895, cores: 2)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3889|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:52:39 2019] GET /index => generated 13287 bytes in 1732 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 2/2] 127.0.0.1 () {44 vars in 830 bytes} [Sun May 26 22:52:47 2019] GET /admin/ => generated 4637 bytes in 162 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 1/3] 127.0.0.1 () {44 vars in 884 bytes} [Sun May 26 22:52:49 2019] GET /admin/goods/indexgoodsbanner/ => generated 5186 bytes in 951 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 1/4] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:52:50 2019] GET /admin/jsi18n/ => generated 6776 bytes in 679 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 2/5] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:52:52 2019] GET /admin/goods/indexgoodsbanner/1/ => generated 7305 bytes in 640 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 1/6] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:52:53 2019] GET /admin/jsi18n/ => generated 6776 bytes in 524 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac825860>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac8254e0>\n[pid: 3893|app: 0|req: 2/7] 127.0.0.1 () {46 vars in 1081 bytes} [Sun May 26 22:53:01 2019] POST /admin/goods/indexgoodsbanner/1/ => generated 0 bytes in 1957 msecs (HTTP/1.1 302) 8 headers in 511 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 2/8] 127.0.0.1 () {42 vars in 1059 bytes} [Sun May 26 22:53:03 2019] GET /admin/goods/indexgoodsbanner/ => generated 5348 bytes in 213 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 3/9] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:53:04 2019] GET /admin/jsi18n/ => generated 6776 bytes in 240 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n设置缓存\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3895|app: 0|req: 3/10] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:53:09 2019] GET /index => generated 13287 bytes in 1483 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 4/11] 127.0.0.1 () {44 vars in 911 bytes} [Sun May 26 22:53:14 2019] GET /admin/goods/indexgoodsbanner/2/ => generated 7305 bytes in 304 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 3/12] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:53:14 2019] GET /admin/jsi18n/ => generated 6776 bytes in 30 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac54e780>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac54e5c0>\n[pid: 3889|app: 0|req: 4/13] 127.0.0.1 () {46 vars in 1085 bytes} [Sun May 26 22:53:25 2019] POST /admin/goods/indexgoodsbanner/2/ => generated 0 bytes in 225 msecs (HTTP/1.1 302) 8 headers in 671 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 5/14] 127.0.0.1 () {42 vars in 1223 bytes} [Sun May 26 22:53:25 2019] GET /admin/goods/indexgoodsbanner/add/ => generated 7152 bytes in 227 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 4/15] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:53:26 2019] GET /admin/jsi18n/ => generated 6776 bytes in 53 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 6/16] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:53:29 2019] GET /admin/goods/indexgoodsbanner/ => generated 5186 bytes in 111 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 5/17] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:53:29 2019] GET /admin/jsi18n/ => generated 6776 bytes in 36 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 6/18] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:53:31 2019] GET /admin/goods/indexgoodsbanner/3/ => generated 7305 bytes in 447 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 5/19] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:53:31 2019] GET /admin/jsi18n/ => generated 6776 bytes in 43 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac4f67f0>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac4f6630>\n[pid: 3895|app: 0|req: 7/20] 127.0.0.1 () {46 vars in 1081 bytes} [Sun May 26 22:53:38 2019] POST /admin/goods/indexgoodsbanner/3/ => generated 0 bytes in 193 msecs (HTTP/1.1 302) 8 headers in 511 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 8/21] 127.0.0.1 () {42 vars in 1059 bytes} [Sun May 26 22:53:38 2019] GET /admin/goods/indexgoodsbanner/ => generated 5348 bytes in 78 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 3/22] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:53:38 2019] GET /admin/jsi18n/ => generated 6776 bytes in 60 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 7/23] 127.0.0.1 () {42 vars in 856 bytes} [Sun May 26 22:53:40 2019] GET /admin/goods/indexgoodsbanner/4/ => generated 7305 bytes in 117 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 6/24] 127.0.0.1 () {40 vars in 727 bytes} [Sun May 26 22:53:40 2019] GET /admin/jsi18n/ => generated 6776 bytes in 42 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac511278>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac512080>\n[pid: 3893|app: 0|req: 7/25] 127.0.0.1 () {46 vars in 1085 bytes} [Sun May 26 22:53:46 2019] POST /admin/goods/indexgoodsbanner/4/ => generated 0 bytes in 923 msecs (HTTP/1.1 302) 8 headers in 511 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 9/26] 127.0.0.1 () {42 vars in 1059 bytes} [Sun May 26 22:53:47 2019] GET /admin/goods/indexgoodsbanner/ => generated 5348 bytes in 124 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 8/27] 127.0.0.1 () {40 vars in 725 bytes} [Sun May 26 22:53:47 2019] GET /admin/jsi18n/ => generated 6776 bytes in 85 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n设置缓存\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3895|app: 0|req: 10/28] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:53:48 2019] GET /index => generated 13287 bytes in 313 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 11/29] 127.0.0.1 () {42 vars in 818 bytes} [Sun May 26 22:53:58 2019] GET /admin/goods/ => generated 3824 bytes in 169 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 9/30] 127.0.0.1 () {44 vars in 898 bytes} [Sun May 26 22:54:00 2019] GET /admin/goods/indexpromotionbanner/ => generated 4730 bytes in 116 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 8/31] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:54:00 2019] GET /admin/jsi18n/ => generated 6776 bytes in 68 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 10/32] 127.0.0.1 () {42 vars in 868 bytes} [Sun May 26 22:54:02 2019] GET /admin/goods/indexpromotionbanner/1/ => generated 6386 bytes in 684 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 4/33] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 22:54:03 2019] GET /admin/jsi18n/ => generated 6776 bytes in 67 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac54b6d8>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac54b320>\n[pid: 3891|app: 0|req: 5/34] 127.0.0.1 () {46 vars in 1097 bytes} [Sun May 26 22:55:01 2019] POST /admin/goods/indexpromotionbanner/1/ => generated 0 bytes in 212 msecs (HTTP/1.1 302) 8 headers in 519 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 12/35] 127.0.0.1 () {42 vars in 1075 bytes} [Sun May 26 22:55:01 2019] GET /admin/goods/indexpromotionbanner/ => generated 4896 bytes in 127 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 13/36] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:55:02 2019] GET /admin/jsi18n/ => generated 6776 bytes in 56 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 14/37] 127.0.0.1 () {42 vars in 868 bytes} [Sun May 26 22:55:03 2019] GET /admin/goods/indexpromotionbanner/2/ => generated 6386 bytes in 248 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 15/38] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 22:55:03 2019] GET /admin/jsi18n/ => generated 6776 bytes in 90 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac526978>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac526588>\n[pid: 3891|app: 0|req: 6/39] 127.0.0.1 () {46 vars in 1093 bytes} [Sun May 26 22:55:08 2019] POST /admin/goods/indexpromotionbanner/2/ => generated 0 bytes in 78 msecs (HTTP/1.1 302) 8 headers in 519 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 16/40] 127.0.0.1 () {42 vars in 1075 bytes} [Sun May 26 22:55:09 2019] GET /admin/goods/indexpromotionbanner/ => generated 4896 bytes in 99 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 9/41] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:55:09 2019] GET /admin/jsi18n/ => generated 6776 bytes in 43 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n设置缓存\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3889|app: 0|req: 11/42] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:55:11 2019] GET /index => generated 13287 bytes in 291 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 17/43] 127.0.0.1 () {44 vars in 877 bytes} [Sun May 26 22:55:20 2019] GET /admin/goods/ => generated 3824 bytes in 106 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 10/44] 127.0.0.1 () {42 vars in 843 bytes} [Sun May 26 22:55:38 2019] GET /admin/goods/indexpromotionbanner/ => generated 4730 bytes in 130 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 11/45] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:55:39 2019] GET /admin/jsi18n/ => generated 6776 bytes in 38 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 12/46] 127.0.0.1 () {44 vars in 877 bytes} [Sun May 26 22:55:42 2019] GET /admin/goods/ => generated 3824 bytes in 32 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 12/47] 127.0.0.1 () {42 vars in 843 bytes} [Sun May 26 22:55:43 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 132 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 13/48] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 22:55:43 2019] GET /admin/jsi18n/ => generated 6776 bytes in 71 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 18/49] 127.0.0.1 () {44 vars in 877 bytes} [Sun May 26 22:55:49 2019] GET /admin/goods/ => generated 3824 bytes in 132 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3891|app: 0|req: 7/50] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:59:22 2019] GET /index => generated 13287 bytes in 185 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3895|app: 0|req: 19/51] 127.0.0.1 () {42 vars in 784 bytes} [Sun May 26 22:59:36 2019] GET /goods/1 => generated 9465 bytes in 424 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 20/52] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 22:59:48 2019] GET /index => generated 13287 bytes in 197 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 8/53] 127.0.0.1 () {42 vars in 821 bytes} [Sun May 26 23:00:37 2019] GET /admin/goods/goodstype/ => generated 5502 bytes in 219 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 21/54] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:00:37 2019] GET /admin/jsi18n/ => generated 6776 bytes in 66 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 13/55] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:00:46 2019] GET /admin/goods/goodstype/1/ => generated 5827 bytes in 100 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 14/56] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:00:47 2019] GET /admin/jsi18n/ => generated 6776 bytes in 30 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fad885198>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fad885da0>\n[pid: 3895|app: 0|req: 22/57] 127.0.0.1 () {46 vars in 1064 bytes} [Sun May 26 23:01:04 2019] POST /admin/goods/goodstype/1/ => generated 0 bytes in 189 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 23/58] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:05 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 101 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 24/59] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:05 2019] GET /admin/jsi18n/ => generated 6776 bytes in 38 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 15/60] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:01:12 2019] GET /admin/goods/goodstype/2/ => generated 5829 bytes in 145 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 25/61] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:01:12 2019] GET /admin/jsi18n/ => generated 6776 bytes in 50 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac492d68>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac492908>\n[pid: 3891|app: 0|req: 9/62] 127.0.0.1 () {46 vars in 1062 bytes} [Sun May 26 23:01:17 2019] POST /admin/goods/goodstype/2/ => generated 0 bytes in 131 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 14/63] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:17 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 122 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 26/64] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:17 2019] GET /admin/jsi18n/ => generated 6776 bytes in 70 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 16/65] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:01:19 2019] GET /admin/goods/goodstype/3/ => generated 5826 bytes in 120 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 15/66] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:01:19 2019] GET /admin/jsi18n/ => generated 6776 bytes in 98 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac499f60>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac499b70>\n[pid: 3891|app: 0|req: 10/67] 127.0.0.1 () {46 vars in 1058 bytes} [Sun May 26 23:01:27 2019] POST /admin/goods/goodstype/3/ => generated 0 bytes in 97 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 16/68] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:27 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 98 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 27/69] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:27 2019] GET /admin/jsi18n/ => generated 6776 bytes in 32 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 17/70] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:01:29 2019] GET /admin/goods/goodstype/4/ => generated 5825 bytes in 442 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 28/71] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:01:29 2019] GET /admin/jsi18n/ => generated 6776 bytes in 46 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac485438>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac485908>\n[pid: 3895|app: 0|req: 29/72] 127.0.0.1 () {46 vars in 1060 bytes} [Sun May 26 23:01:34 2019] POST /admin/goods/goodstype/4/ => generated 0 bytes in 173 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 30/73] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:34 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 152 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 31/74] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:34 2019] GET /admin/jsi18n/ => generated 6776 bytes in 120 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 18/75] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:01:37 2019] GET /admin/goods/goodstype/5/ => generated 5832 bytes in 145 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 17/76] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:01:37 2019] GET /admin/jsi18n/ => generated 6776 bytes in 101 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac4d44e0>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac4d47b8>\n[pid: 3889|app: 0|req: 18/77] 127.0.0.1 () {46 vars in 1064 bytes} [Sun May 26 23:01:42 2019] POST /admin/goods/goodstype/5/ => generated 0 bytes in 116 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 19/78] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:42 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 93 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 11/79] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:42 2019] GET /admin/jsi18n/ => generated 6776 bytes in 44 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 20/80] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:01:43 2019] GET /admin/goods/goodstype/6/ => generated 5825 bytes in 276 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 32/81] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:01:44 2019] GET /admin/jsi18n/ => generated 6776 bytes in 49 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\ngetting connection\n<fdfs_client.connection.Connection object at 0x7f1fac40b048>\n<fdfs_client.fdfs_protol.Tracker_header object at 0x7f1fac40b438>\n[pid: 3893|app: 0|req: 21/82] 127.0.0.1 () {46 vars in 1064 bytes} [Sun May 26 23:01:49 2019] POST /admin/goods/goodstype/6/ => generated 0 bytes in 94 msecs (HTTP/1.1 302) 8 headers in 495 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 33/83] 127.0.0.1 () {42 vars in 1029 bytes} [Sun May 26 23:01:49 2019] GET /admin/goods/goodstype/ => generated 5647 bytes in 90 msecs (HTTP/1.1 200) 8 headers in 420 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 34/84] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:01:49 2019] GET /admin/jsi18n/ => generated 6776 bytes in 11 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n设置缓存\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3893|app: 0|req: 22/85] 127.0.0.1 () {42 vars in 773 bytes} [Sun May 26 23:01:52 2019] GET /index => generated 13287 bytes in 329 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 35/86] 127.0.0.1 () {44 vars in 866 bytes} [Sun May 26 23:02:55 2019] GET /admin/goods/ => generated 3824 bytes in 78 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 23/87] 127.0.0.1 () {44 vars in 898 bytes} [Sun May 26 23:03:10 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 112 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 36/88] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:03:10 2019] GET /admin/jsi18n/ => generated 6776 bytes in 47 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 37/89] 127.0.0.1 () {42 vars in 868 bytes} [Sun May 26 23:03:13 2019] GET /admin/goods/indextypegoodsbanner/1/ => generated 8786 bytes in 155 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 24/90] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 23:03:13 2019] GET /admin/jsi18n/ => generated 6776 bytes in 110 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 12/91] 127.0.0.1 () {44 vars in 921 bytes} [Sun May 26 23:03:21 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 125 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 38/92] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:03:21 2019] GET /admin/jsi18n/ => generated 6776 bytes in 34 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 13/93] 127.0.0.1 () {42 vars in 870 bytes} [Sun May 26 23:03:22 2019] GET /admin/goods/indextypegoodsbanner/36/ => generated 8788 bytes in 165 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 14/94] 127.0.0.1 () {40 vars in 732 bytes} [Sun May 26 23:03:22 2019] GET /admin/jsi18n/ => generated 6776 bytes in 34 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 25/95] 127.0.0.1 () {44 vars in 922 bytes} [Sun May 26 23:03:26 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 133 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 39/96] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:03:26 2019] GET /admin/jsi18n/ => generated 6776 bytes in 46 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 26/97] 127.0.0.1 () {44 vars in 923 bytes} [Sun May 26 23:03:28 2019] GET /admin/goods/indextypegoodsbanner/1/ => generated 8786 bytes in 187 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 40/98] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 23:03:29 2019] GET /admin/jsi18n/ => generated 6776 bytes in 43 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 27/99] 127.0.0.1 () {44 vars in 921 bytes} [Sun May 26 23:03:40 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 139 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 19/100] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:03:40 2019] GET /admin/jsi18n/ => generated 6776 bytes in 34 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3889|app: 0|req: 20/101] 127.0.0.1 () {44 vars in 877 bytes} [Sun May 26 23:03:43 2019] GET /admin/goods/ => generated 3824 bytes in 88 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 41/102] 127.0.0.1 () {44 vars in 898 bytes} [Sun May 26 23:03:48 2019] GET /admin/goods/indexpromotionbanner/ => generated 4730 bytes in 117 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 42/103] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:03:49 2019] GET /admin/jsi18n/ => generated 6776 bytes in 15 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 15/104] 127.0.0.1 () {42 vars in 868 bytes} [Sun May 26 23:03:50 2019] GET /admin/goods/indexpromotionbanner/1/ => generated 6386 bytes in 159 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 16/105] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 23:03:50 2019] GET /admin/jsi18n/ => generated 6776 bytes in 41 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 21/106] 127.0.0.1 () {44 vars in 921 bytes} [Sun May 26 23:07:25 2019] GET /admin/goods/indexpromotionbanner/ => generated 4730 bytes in 128 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 28/107] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:07:25 2019] GET /admin/jsi18n/ => generated 6776 bytes in 131 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 43/108] 127.0.0.1 () {44 vars in 877 bytes} [Sun May 26 23:07:27 2019] GET /admin/goods/ => generated 3824 bytes in 138 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 44/109] 127.0.0.1 () {42 vars in 821 bytes} [Sun May 26 23:07:31 2019] GET /admin/goods/goodstype/ => generated 5502 bytes in 234 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 29/110] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:07:31 2019] GET /admin/jsi18n/ => generated 6776 bytes in 33 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 17/111] 127.0.0.1 () {42 vars in 835 bytes} [Sun May 26 23:07:33 2019] GET /admin/goods/goodstype/1/ => generated 5827 bytes in 249 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 45/112] 127.0.0.1 () {40 vars in 720 bytes} [Sun May 26 23:07:33 2019] GET /admin/jsi18n/ => generated 6776 bytes in 204 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 46/113] 127.0.0.1 () {44 vars in 888 bytes} [Sun May 26 23:07:36 2019] GET /admin/goods/goodstype/ => generated 5502 bytes in 202 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 30/114] 127.0.0.1 () {40 vars in 718 bytes} [Sun May 26 23:07:36 2019] GET /admin/jsi18n/ => generated 6776 bytes in 48 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3895|app: 0|req: 47/115] 127.0.0.1 () {44 vars in 866 bytes} [Sun May 26 23:07:37 2019] GET /admin/goods/ => generated 3824 bytes in 89 msecs (HTTP/1.1 200) 6 headers in 214 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 48/116] 127.0.0.1 () {44 vars in 898 bytes} [Sun May 26 23:07:39 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 252 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3893|app: 0|req: 31/117] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:07:39 2019] GET /admin/jsi18n/ => generated 6776 bytes in 51 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3895|app: 0|req: 49/118] 127.0.0.1 () {44 vars in 923 bytes} [Sun May 26 23:07:41 2019] GET /admin/goods/indextypegoodsbanner/1/ => generated 8786 bytes in 80 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 0)\n[pid: 3891|app: 0|req: 18/119] 127.0.0.1 () {40 vars in 731 bytes} [Sun May 26 23:07:41 2019] GET /admin/jsi18n/ => generated 6776 bytes in 24 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 22/120] 127.0.0.1 () {44 vars in 921 bytes} [Sun May 26 23:07:50 2019] GET /admin/goods/indextypegoodsbanner/ => generated 13011 bytes in 215 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3891|app: 0|req: 19/121] 127.0.0.1 () {40 vars in 729 bytes} [Sun May 26 23:07:50 2019] GET /admin/jsi18n/ => generated 6776 bytes in 92 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n[pid: 3893|app: 0|req: 32/122] 127.0.0.1 () {42 vars in 870 bytes} [Sun May 26 23:07:51 2019] GET /admin/goods/indextypegoodsbanner/31/ => generated 8788 bytes in 428 msecs (HTTP/1.1 200) 7 headers in 336 bytes (1 switches on core 1)\n[pid: 3889|app: 0|req: 23/123] 127.0.0.1 () {40 vars in 732 bytes} [Sun May 26 23:07:52 2019] GET /admin/jsi18n/ => generated 6776 bytes in 33 msecs (HTTP/1.1 200) 3 headers in 93 bytes (1 switches on core 0)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 3891|app: 0|req: 20/124] 127.0.0.1 () {42 vars in 784 bytes} [Sun May 26 23:15:01 2019] GET /goods/5 => generated 9325 bytes in 119 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n*** Starting uWSGI 2.0.18 (64bit) on [Mon May 27 12:47:23 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x20f4680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 7 seconds on interpreter 0x20f4680 pid: 2486 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2486)\nspawned uWSGI worker 1 (pid: 2490, cores: 2)\nspawned uWSGI worker 2 (pid: 2491, cores: 2)\nspawned uWSGI worker 3 (pid: 2492, cores: 2)\nspawned uWSGI worker 4 (pid: 2494, cores: 2)\n[pid: 2491|app: 0|req: 1/1] 127.0.0.1 () {40 vars in 737 bytes} [Mon May 27 12:48:32 2019] GET / => generated 3010 bytes in 22514 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 2490|app: 0|req: 1/2] 127.0.0.1 () {40 vars in 737 bytes} [Mon May 27 12:49:52 2019] GET / => generated 3010 bytes in 18251 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2491|app: 0|req: 2/3] 127.0.0.1 () {42 vars in 791 bytes} [Mon May 27 12:50:54 2019] GET /goods/13 => generated 9324 bytes in 2496 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 2494|app: 0|req: 1/4] 127.0.0.1 () {42 vars in 806 bytes} [Mon May 27 12:51:16 2019] GET /user/address => generated 3529 bytes in 11120 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 2491|app: 0|req: 3/5] 127.0.0.1 () {42 vars in 805 bytes} [Mon May 27 12:51:56 2019] GET /user/index.html => generated 4215 bytes in 11 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n[pid: 2491|app: 0|req: 4/6] 127.0.0.1 () {42 vars in 805 bytes} [Mon May 27 12:51:57 2019] GET /cart/index.html => generated 3639 bytes in 9 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2492|app: 0|req: 1/7] 127.0.0.1 () {42 vars in 794 bytes} [Mon May 27 12:52:06 2019] GET /goods/13 => generated 9324 bytes in 2119 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2492|app: 0|req: 2/8] 127.0.0.1 () {40 vars in 747 bytes} [Mon May 27 12:52:38 2019] GET /index => generated 13287 bytes in 252 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2491|app: 0|req: 5/9] 127.0.0.1 () {46 vars in 882 bytes} [Mon May 27 12:52:46 2019] POST /cart/add => generated 67 bytes in 193 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 0)\n[pid: 2492|app: 0|req: 3/10] 127.0.0.1 () {46 vars in 882 bytes} [Mon May 27 12:52:52 2019] POST /cart/add => generated 67 bytes in 56 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 0)\n[pid: 2492|app: 0|req: 4/11] 127.0.0.1 () {46 vars in 912 bytes} [Mon May 27 12:53:12 2019] POST /order/place => generated 5833 bytes in 130 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 2494|app: 0|req: 2/12] 127.0.0.1 () {46 vars in 894 bytes} [Mon May 27 12:53:23 2019] POST /order/commit => generated 54 bytes in 99 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 0)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n"
  },
  {
    "path": "dailyfresh/uwsgi.pid",
    "content": "2486\n"
  },
  {
    "path": "dailyfresh/uwsgi2.ini",
    "content": "[uwsgi]\n#使用nginx连接时使用\nsocket=127.0.0.1:8081\n#直接做web服务器使用 python manage.py runserver ip:port\n#http=127.0.0.1:8080\n#项目目录\nchdir=/home/hnz/py/dailyfresh\n#项目中wsgi.py文件的目录，相对于项目目录\nwsgi-file=dailyfresh/wsgi.py\n#指定启动的工作进程数\nprocesses=4\n#指定工作进程中的线程数\nthreads=2\nmaster=True\n#保存启动之后主进程的pid\npidfile=uwsgi2.pid\n#设置uwsgi后台运行，uwsgi.log保存日志信息\ndaemonize=uwsgi2.log\n#设置虚拟环境的路径\nvirtualenv=/home/hnz/.virtualenvs/pytest"
  },
  {
    "path": "dailyfresh/uwsgi2.log",
    "content": "*** Starting uWSGI 2.0.15 (64bit) on [Sat Nov 25 17:14:32 2017] ***\ncompiled with version: 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1) on 30 October 2017 06:31:19\nos: Darwin-15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64\nnodename: smartli.local\nmachine: x86_64\nclock source: unix\ndetected number of CPU cores: 8\ncurrent working directory: /Users/smart/Desktop/dj/bj18/dailyfresh\nwriting pidfile to uwsgi2.pid\ndetected binary path: /Users/smart/.virtualenvs/dailyfresh/bin/uwsgi\n!!! no internal routing support, rebuild with pcre support !!!\nchdir() to /Users/smart/Desktop/dj/bj18/dailyfresh\nyour processes number limit is 709\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 10240\nlock engine: OSX spinlocks\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8081 fd 3\nPython version: 3.5.2 (default, Oct 21 2017, 11:45:19)  [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]\nSet PythonHome to /Users/smart/.virtualenvs/dailyfresh\nPython main interpreter initialized at 0x7fa6e20006a0\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 415200 bytes (405 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7fa6e20006a0 pid: 8115 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 8115)\nspawned uWSGI worker 1 (pid: 8116, cores: 2)\nspawned uWSGI worker 2 (pid: 8117, cores: 2)\nspawned uWSGI worker 3 (pid: 8118, cores: 2)\nspawned uWSGI worker 4 (pid: 8119, cores: 2)\n[pid: 8117|app: 0|req: 1/1] 127.0.0.1 () {42 vars in 819 bytes} [Sat Nov 25 17:19:02 2017] GET /goods/8 => generated 9326 bytes in 479 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n[pid: 8118|app: 0|req: 1/2] 127.0.0.1 () {42 vars in 819 bytes} [Sat Nov 25 17:19:16 2017] GET /goods/8 => generated 9326 bytes in 375 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n[pid: 8119|app: 0|req: 1/3] 127.0.0.1 () {48 vars in 919 bytes} [Sat Nov 25 18:27:44 2017] POST /cart/add => generated 67 bytes in 408 msecs (HTTP/1.1 200) 3 headers in 94 bytes (2 switches on core 0)\n*** Starting uWSGI 2.0.18 (64bit) on [Mon May 27 12:47:32 2019] ***\ncompiled with version: 5.4.0 20160609 on 25 May 2019 05:17:46\nos: Linux-4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019\nnodename: hnz-virtual-machine\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/hnz/py/dailyfresh\nwriting pidfile to uwsgi2.pid\ndetected binary path: /home/hnz/.virtualenvs/pytest/bin/uwsgi\nchdir() to /home/hnz/py/dailyfresh\nyour processes number limit is 7643\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1048576\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuwsgi socket 0 bound to TCP address 127.0.0.1:8081 fd 3\nPython version: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]\nSet PythonHome to /home/hnz/.virtualenvs/pytest\nPython main interpreter initialized at 0x24fc680\npython threads support enabled\nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 416880 bytes (407 KB) for 8 cores\n*** Operational MODE: preforking+threaded ***\nWSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x24fc680 pid: 2500 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 2500)\nspawned uWSGI worker 1 (pid: 2502, cores: 2)\nspawned uWSGI worker 2 (pid: 2503, cores: 2)\nspawned uWSGI worker 3 (pid: 2505, cores: 2)\nspawned uWSGI worker 4 (pid: 2508, cores: 2)\n[pid: 2502|app: 0|req: 1/1] 127.0.0.1 () {40 vars in 737 bytes} [Mon May 27 12:48:59 2019] GET / => generated 3010 bytes in 6145 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n设置缓存\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2508|app: 0|req: 1/2] 127.0.0.1 () {40 vars in 747 bytes} [Mon May 27 12:50:16 2019] GET /index => generated 13287 bytes in 15039 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)\n[pid: 2508|app: 0|req: 2/3] 127.0.0.1 () {42 vars in 802 bytes} [Mon May 27 12:51:12 2019] GET /user/order/1 => generated 4559 bytes in 765 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2502|app: 0|req: 2/4] 127.0.0.1 () {42 vars in 792 bytes} [Mon May 27 12:51:49 2019] GET /user/ => generated 4602 bytes in 1135 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2508|app: 0|req: 3/5] 127.0.0.1 () {42 vars in 792 bytes} [Mon May 27 12:51:54 2019] GET /cart/ => generated 10865 bytes in 81 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n[pid: 2502|app: 0|req: 3/6] 127.0.0.1 () {42 vars in 810 bytes} [Mon May 27 12:52:03 2019] GET /goods/index.html => generated 3058 bytes in 13 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2505|app: 0|req: 1/7] 127.0.0.1 () {46 vars in 883 bytes} [Mon May 27 12:52:12 2019] POST /cart/add => generated 67 bytes in 603 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 0)\n[pid: 2505|app: 0|req: 2/8] 127.0.0.1 () {42 vars in 789 bytes} [Mon May 27 12:52:41 2019] GET /goods/1 => generated 9465 bytes in 400 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2502|app: 0|req: 4/9] 127.0.0.1 () {46 vars in 882 bytes} [Mon May 27 12:52:50 2019] POST /cart/add => generated 67 bytes in 98 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 1)\n/home/hnz/.virtualenvs/pytest/lib/python3.5/site-packages/django_redis/__init__.py:10: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.\n  cache = get_cache(alias)\n\n[pid: 2503|app: 0|req: 1/10] 127.0.0.1 () {42 vars in 787 bytes} [Mon May 27 12:53:08 2019] GET /cart/ => generated 12253 bytes in 987 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)\n[pid: 2508|app: 0|req: 4/11] 127.0.0.1 () {46 vars in 894 bytes} [Mon May 27 12:53:16 2019] POST /order/commit => generated 54 bytes in 217 msecs (HTTP/1.1 200) 3 headers in 94 bytes (1 switches on core 1)\nSIGINT/SIGQUIT received...killing workers...\nworker 1 buried after 1 seconds\nworker 2 buried after 1 seconds\nworker 3 buried after 1 seconds\nworker 4 buried after 1 seconds\ngoodbye to uWSGI.\n"
  },
  {
    "path": "dailyfresh/uwsgi2.pid",
    "content": "2500\n"
  },
  {
    "path": "requirements.txt",
    "content": "amqp==1.4.9\nanyjson==0.3.3\nbilliard==3.3.0.23\ncelery==5.2.2\ncertifi==2023.7.22\nchardet==3.0.4\nDjango==2.2.28\ndjango-haystack==2.7.0\ndjango-redis==3.8.4\ndjango-redis-sessions==0.5.6\ndjango-tinymce==3.4.0\nfdfs-client-py==1.2.6\nidna==2.8\nitsdangerous==1.1.0\njieba==0.39\nkombu==3.0.37\nmutagen==1.42.0\nPillow==9.0.1\npycryptodomex==3.7.2\nPyMySQL==0.9.3\npython-alipay-sdk==1.10.0\npytz==2019.1\nredis==2.10.6\nredis-py-cluster==1.3.6\nrequests==2.31.0\nsqlparse==0.3.0\nurllib3==1.26.5\nuWSGI==2.0.18\nvine==1.3.0\nWhoosh==2.7.4\n"
  }
]