AKL website project.
This repository is move from https://launchpad.net/akl-web-site .
- All instructions bellow should perfectly work on Ubuntu 14.04. If you use something else, project setup may be slightly different.
- Before you start, make sure, that you have github.com with SSH key in place.
~/.git/configshould include your name and email (make sure, that you specify same email address you use for Github). The section in
~/.git/configfile should look like this:
[user] name = Name Surname email = email@example.com
Preparing development environment
First of all, install
sudo apt install git
Then create project directory:
mkdir akl.lt && cd akl.lt
This directory will contain several other repositories, main
akl.lt-zope-export repository with exported data from old
akl.lt website. So clone these two repositories:
git clone firstname.lastname@example.org:python-dirbtuves/akl.lt.git git clone email@example.com:mgedmin/akl.lt-zope-export.git
Now change current working directory to
akl.lt and now we will work from
First thing you have to do is to install system dependencies, these are
development headers and some libraries (please note, that this command will be
sudo and will ask your password):
Now, build project and then run tests to make sure, that everything is OK
make will take some time to finish, be patient!):
make make test
Last thing to do, is to import data from old website export:
bin/django akllt_importzope ../akl.lt-zope-export
Now you should be able to run development server and see new website working:
If you don't have Ubuntu 14.04, you can use Vagrant with Ubuntu virtual machine.
Download and install Vagrant 1.6.* from https://www.vagrantup.com/downloads.html .
Start virtual machine
sudo apt install nfs-kernel-server nfs-common
vagrant up # Will ask for password to set up NFS mount which is faster on Linux/OSX
Build project inside virtual machine:
vagrant ssh cd /home/vagrant/akl.lt make # bootstrap takes a while, be patient make test # Make sure everything is green make run # and open http://127.0.0.1:8000 in your browser
How to run tests
There are several ways how you can run tests. Below is list of all available options:
This runs all available tests, including code style checkers and code linters:
Runs only tests, without code style checkers and code linters:
Runs all tests from specified directory path:
Runs all tests in specified file path:
Run all tests in specified test case class
Run single test method:
Write translation messages in Lithuanian language.