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/

  • 相关阅读:
    eclipse开发环境搭建
    如何在不知道密码的情况下卸载趋势防毒墙网络版
    PB 将游标中的数据存到数组中
    SQL Server 系统表使用举例
    row_number() over(partition by a order by b desc) rn 用法
    C#选中当前一行,判断是否为空(顺序)
    C#DataTable与Grid的差别
    C#采番的前端与SQL的写法
    Grid的check
    Combox的去重方法
  • 原文地址:https://www.cnblogs.com/javastart/p/9739925.html
Copyright © 2011-2022 走看看