Code Monkey home page Code Monkey logo

stucampus's Introduction

安装virtualenv

pip install virtualenv

新建virtualenv

virtualenv stucampus_env

启动虚拟环境

cd stucampus_env
source bin/activate 

下载源码

 git clone https://github.com/jimczj/Stucampus.git

安装依赖模块

sudo apt-get install libxml2-dev libxslt1-dev
sudo apt-get install PIL --allow-external PIL --allow-unverified PIL
pip install -r requirements.txt#如果有报错,自行谷歌,然后补充一下本文件

更改配置 copy一份stucampus/config/production.py.sample, 重命名为 production.py, 记得把DEBUG改成True

cp Stucampus/stucampus/config/production.py.sample Stucampus/stucampus/config/production.py
sudo vim Stucampus/stucampus/config/production.py

在production.py添加数据库的配置,可以参考下图

这里写图片描述

如果本地没有安装postgresql_psycopg2,就用sqlite3(python自带数据库),为了和主站保持一致,防止未知错误的出现,还是建议安装postgresql_psycopg

如果用非sqlite3数据库(Mysql,postgresql_psycopg2),数据库和用户,密码,需要自行登录数据库去添加,然后再配置上去,可以参考http://blog.csdn.net/qq_32445689/article/details/50988273

用sqlite3的时候,数据库会按配置文件自动生成在本地,直接填写好配置文件就执行数据库建表和同步操作

数据库建表并同步

python manage.py makemigrations
python manage.py migrate

运行

python manage.py runserver

**注意:**开发新项目的时候,建议自己开一个分支,然后将分支push上github,将github上的分支pull下来的时候,也建议新开分支再pull 比如pull newBrand这个分支

git checkout -b newBrand#新建分支并切换到该分支
git pull origin newBrand#将newBrand的代码pull下来

stucampus's People

Contributors

fnhn avatar gearl avatar heydolby avatar hxseek avatar jimczj avatar skys215 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.