2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mezzanine導入ながれとはまったことメモ

Last updated at Posted at 2016-10-24

Mezzanineとは

pythonのwebフレームワークのdjangoのcmsで、wordpressのように、簡単にwebページを作成できるようなものみたいです。(あまり詳しくはありません笑)

使った環境

  • pyenv
  • python3.5.2
  • さくらのクラウド(ubuntu)
  • pip
  • django

環境作成の流

pyenvインストール


$ sudo apt-get update
$ sudo apt-get install git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv

その後.bashrcに以下のことを書き込む

.bashrc
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

かけたら、以下のコマンド!!!!


$ source ~/.bashrc

これで、pyenv が使えるようになりました

参考

Python 3.5.2を使えるように


$ sudo pyenv install 3.5.2
$ sudo pyenv global 3.5.2

Mezzanineを入れる

$ pip install mezzanine

これで入ったので
あとはプロジェクトを作る!

プロジェクト&db作成


$ mezzanine-project myproject
$ cd myproject
db作成↓
$ python manage.py createdb

これで、できるはず!!!
あとは確認!

確認

$ python manage.py runserver 0.0.0.0:8000

参考

これで、クラウドの ip:8000にアクセスして、表示できればOK

はまったこと

pyenvをいれて、 やると、pipのバージョンが最新ではなかったので、

$ pip install --upgrade pip 

したら、mezzanineがなぜかinstallできなくて、結構悩みました、
updateしないとできるので、しないことをお勧めします。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?