第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

 

posted @ 2017-05-21 09:36  lianhuaren  阅读(223)  评论(0编辑  收藏  举报