• 第8月第21天 django lbforum项目记录


    1.

    576  django-admin.py startproject lbforum01
      577  ls
      578  cd lbforum01/
      579  ls
      580  python manage.py startapp forum
      581  sudo pip install lbforum
      582  ls
      583  python manage.py bower install
      584  python manage.py bower migrate
    
      588  sudo pip install django-bower
    
      591  sudo pip install postmarkup
      592  python manage.py runserver
      593  python manage.py makemigrations
      594  python manage.py migrate
      595  python manage.py runserver

    https://github.com/vicalloy/LBForum

    install

    • Clone LBForum repository from git://github.com/vicalloy/lbforum-site.git
    • use source env.rc to start lbforum environment.
    • $mg is a shortcut for "python manage.py "
    • $mg migrate
    • $mg createsuperuser
    • $mg bower install
    • $mg runserver

    django 1.10.0出错

    try changing the MIDDLEWARE_CLASSES

    MIDDLEWARE_CLASSES = [
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
        'django.contrib.messages.middleware.MessageMiddleware',
        'django.middleware.clickjacking.XFrameOptionsMiddleware',
        'django.middleware.security.SecurityMiddleware',
    ]

    https://stackoverflow.com/questions/37914645/custom-settings-and-wsgi-in-django-1-10-give-me-error

     mysql 

    pip install MySQL-python

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'lbforum',
            'USER': 'root',
            'PASSWORD': '',
            'HOST': '127.0.0.1',
            # 'HOST': '139.199.133.195',
            'PORT': '3306',
            'OPTIONS':{'init_command':'SET storage_engine=INNODB;'},
        }
    }
    

      

    初始化数据

    add categories

    add forum

    2.

    http://www.cnblogs.com/esperyong/archive/2012/12/20/2826690.html

    https://docs.djangoproject.com/en/1.11/topics/auth/customizing/

    http://python.usyiyi.cn/django/index.html

    http://blog.chinaunix.net/uid/21633169/abstract/3.html

    http://zhongwei-leg.iteye.com/blog/658435

    3.django 001

    http://www.cnblogs.com/chenchao1990/p/5311531.html

    4.进入127.0.0.1/admin

    http://www.cnblogs.com/kongzhagen/p/6679365.html

  • 相关阅读:
    POJ 3468 A Simple Problem with Integers(线段树区间求和)
    windows+Ubuntu双系统 windows引导修复
    CSDN博文大赛火爆开启
    TNS-12541,TNS-12560,TNS-00511,TNS-12542,TNS-12560,TNS-00512数据库启动监听报错
    MResource
    【LeetCode】【Python】Linked List Cycle
    中间件解析FDMEMTABLE.delta生成SQL的方法
    TDSTCPServerTransport 的Filters
    DATASNAP压缩过滤器的使用
    咏南CS插件开发框架也可BS方式部署
  • 原文地址:https://www.cnblogs.com/javastart/p/6883984.html
Copyright © 2020-2023  润新知