zoukankan      html  css  js  c++  java
  • 第25月第3天 Mxshop项目记录01

    1.项目

    https://github.com/mtianyan/VueDjangoFrameWorkShop

    virtualenv命令

    virtualenv .

    virtualenv -p /anaconda3/bin/python3 shop02

    cd shop02/

    source bin/activate

     

    630  which python

      631   pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  django==1.11.3

      632   pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  djangorestframework==3.6.3

      633  pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  markdown django-filter==1.1.0

      634  django-admin.py startproject MxShop

     

      637  cd MxShop/

     

      640  python manage.py runserver

      641  mysql_config

      642  pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  mysqlclient==1.3.10

     

    CREATE DATABASE IF NOT EXISTS article_spider DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

     

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  pillow

     

     

    sqlmigrate

     

    ./manage.py sqlmigrate share 0001

     

     

    django-filter

    So, from django-filter==2.0 onwards, use field_name instead of name

     

    https://stackoverflow.com/questions/51850985/django-filter-typeerror-at-goods-init-got-an-unexpected-keyword-argumen

     

     

    vue

     

     sudo chown -R $USER /usr/local 

    npm install -g cnpm --registry=https://registry.npm.taobao.org

     

    http://www.runoob.com/vue2/vue-install.html

     

    2.

     

     

     

    startapp 创建二级目录

     

    # 初始化路径,可以使用相对路径,比较方便
    sys.path.insert(0, BASE_DIR)
    sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))
    sys.path.insert(0, os.path.join(BASE_DIR, 'extra_apps'))

    3.doesn't declare an explicit app_label and isn't in an application

    INSTALLED_APPS需修改为

    # 注册app
    'apps.goods',
    'apps.trade',
    'apps.users',
    'apps.user_operation',

    4.xadmin依赖

    pip install django-crispy-forms django-import-export django-reversion django-formtools future httplib2 six 

    pip install xlwt xlsxwriter

     

    https://github.com/sshwsfc/xadmin

    5. django rest framework

    • pip install coreapi                         drf的文档支持
    • pip install django-guardian           drf对象级别的权限支持

    https://www.django-rest-framework.org/

  • 相关阅读:
    用 Java 通过串口发送手机短信(二)简单使用
    jquery.lazyload.js实现图片延迟加载——wordpress图片随滚动条渐显效果
    java的mysql连接池
    html5客户端本地存储之sessionStorage及storage事件
    flash chart(amCharts的破解)
    实现igoogle效果的两种方法比较
    “SQL Server (SQL2005) 服务因 126 (0x7E) 服务性错误而停止”的解决方法 
    一个超简单的方法验证文本框中内容的数据类型
    我的对联
    Ajax调用后类方法时报”对象未定义“错误解决方法
  • 原文地址:https://www.cnblogs.com/javastart/p/9739925.html
Copyright © 2011-2022 走看看