Note: this version of Ninamori CMS is tested only with python 2.7

Clone repo and install requirements

Optional: create a virtual environment, (you may need to install virtualenv package)

It is easier to use pip, you can get pip in Debian and Ubuntu with sudo apt-get install python-pip
After that you should upgrade pip with pip calling sudo pip install --upgrade pip
In most distros you can get the required tools with sudo pip install virtualenv virtualenvwrapper, you may need to restart your shell
Good way to set up the virtual environment is mkvirtualenv ninamori
Use the workon ninamori command to activate the virtual environment and deactivate to return things to normal (or you can just exit)
The name of the virtual environment in brackets at the beginning of the command prompt means you are in it
It is useful to make your workon to change directory right to where your is located, add cd ~/ninamori in ~/.virtualenvs/ninamori/bin/postactivate file to do so

Optional: add autocompleteon for django commands

For bash you can download and install this script
The simpliest way is something like this:
wget -O ~/ && echo 'source $HOME/' >> ~/.bashrc

Optional: fork repository to your bitbucket account

Go to Ninamori CMS Bitbucket page↷ and click "Fork" menu item
Edit fork initial settings

You will need git, use sudo apt-get install git if you have Debian or Ubuntu and somehow do not have git yet

git clone ninamori
cd ninamori
pip install --requirement requirements.txt

Clone templates repo into templates subdir

git clone templates

Download and unpack the static files

Optional: make your own static files instead

tar -xzf static.tar.gz
rm static.tar.gz

You have to put your icon to <where-is-your-ninamori>/static/img/icon.png, or else you will have no icon and 404 error for every request

Copy settings template and edit the copy to set the settings for your site

cp ninamori/ ninamori/
nano ninamori/

Install and configure services for choosen backends

Setup the database and static files

Optional: Compile locale messages if you want to use translations by ./ compilemessages

./ makemigrations
./ migrate
./ collectstatic

Prepare your webserver

Either configure uWSGI service or just run the command ./ runserver <ip address>[:port]

Use runserver command only for testing and development, do not use it in production
Web server configuration is a serious business and is not covered in this briefing
Author recommends to set up Nginx and to proxy uWSGI trough it
It is a good idea to serve static and media directly by Nginx

Add management commands to crontab

You may use any scheduler you like sendmessages will queue email messages for your subscribers update_gravatars will check if there are gravatar updates and will download them if needed sendcommentnotifications will queue email messages with comment notifications for watcing commentators send_queued will send queued email messages clear_sent_messages will clear successfully sent email messages
Here is author´s crontab example:

*/30 * * * *  /home/www/ninamori/ sendmessages --silent
0  2 * * * *  /home/www/ninamori/ update_gravatars --silent
*/30 * * * *  /home/www/ninamori/ sendcommentnotifications --silent
*/30 * * * *  /home/www/ninamori/ send_queued_messages --limit=100
*/30 * * * *  /home/www/ninamori/ clear_sent_messages --offset=300
Should you have any problems with the deployment, feel free to file a ticket↷ or to contact Goury.


This part of the readme is not planned before future release.
Generally you should always do ./ makemigrations and ./ migrate and drop cache (depends on caching backend of our choice).
You may also require to update your static files and almost always you will need to update your templates and settings to new version.
Check upgrading.txt for extra special information.

Contact Goury if you need help.

Management commands

Generate qr-tokens

./ generate_polls_tokens --token_count <how many> --redirect <redirect> --qr
./ generate_mailer_tokens --token_count <how many> --list_uuid <uuid> --qr

Use --qr6 or --qr24 to make printer-ready lists of qr codes
6 codes per A4 page or 24 codes per A2 page should be readable by any phone camera
Add --email=<email> to send email message with urls and images

Update userprofiles in case of emergency

./ updateprofiles
Should you ever experience uncomplete userprofile object, you can try fix it with this command

General usage

Follow "Help page" link in the control panel.
By the way, it is a good idea to run the ./ createsuperuser command to be able to log to the control panel.
Staff members you create will also have an access to the entire help page.

Yandex Money integration

Register an account for service
Type in your Yandex Money wallet id and secret in the ninamori/ file
Create a Yandex Balance issue in the control panel
Place link <protocol>://<your-domain>/api/yandex-inform?id= in the Yandex Money http feedback settings