Twistranet - Installation details
=================================

Requirements
------------

- A computer with your favorite os, example :

    - linux (debian, redhat, ubuntu, etc ...)

    - windows (xp, seven, vista, 2003 server etc)

    - Mac OS X ...

- an internet connection

- python2.6 or later (python 3 is not supported)

    To install python, goto http://python.org/download/
    choose, download, and install the last Python 2.xx for your platform.
    Under Linux or Mac OS, Python is often pre-installed

- PIL http://www.pythonware.com/products/pil/

- pip http://pypi.python.org/pypi/pip

pip is the new installer for python packages, it replaces
setuptools with many powerful features (install, list intalled, uninstall, upgrade ...)

If setuptools is installed on your system (setuptools, also called easy_install is the old python packages installer), 
you can just enter at command prompt::

    $ easy_install pip

If setuptools is not here, you can install pip from sources,

under linux ::

    $ wget http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
    $ tar xzf pip-1.2.1.tar.gz

.. note:: Under macos you can use curl -O <url> instead of wget

.. note:: Under windows just download and unpack the folder 'pip-1.2.1'

Open a command prompt::

    $ cd pip-1.2.1
    $ python setup.py install
    $ cd ..
    $ rm -Rf pip-1.2.1


.. seealso:: More information can be found here : http://guide.python-distribute.org/installation.html

- if you want to install the devel version of Twistranet, install also GIT (more information here https://github.com/)

Installation
------------

Open a command line
To install the last Twistranet released version

    $ pip install numericube-twistranet

.. note:: behind an http proxy you need to add an option to pip, exemple:: pip --proxy proxy-server:proxy-port install numericube-twistranet

Or to install the devel version from github Twistranet public repository, open a command line

    $ git clone git://github.com/numericube/twistranet.git ./numericube-twistranet
    $ pip install ./numericube-twistranet 

.. note:: the './' is important here, it can be replaced by any "path to" expression

Delete the installation folder, no more used

    $ rm -Rf ./numericube-twistranet

Twistranet and all its dependencies are downloaded and installed
in your python path ::

  - Twistranet
  
  - Django
  
  - django-haystack
  
  - django-debug-toolbar
  
  - django-tinymce
  
  - sorl-thumbnail

  - django_compressor
  
  - django-modeltranslation


Create a new Twistranet project
-------------------------------

Twistranet is based on django framework

launch at command prompt 

    $ twistranet_project mysite

This will create 'mysite' folder, and install all you need for your project in it :

  - your project configuration 'local_settings.py'
  
  - django initialization files
  
  - a sqlite data base in var/tn.db
  
  - a site root for static files, css, js and images

The 'twistranet_project' command also starts the server on port 8000

Your admin password is given at the end of the start log.

To stop it, just enter CTRL-C

You will probably have to change some configuration in local_settings.py

Run the server in foreground

    $ cd mysite
    $ python manage.py runserver


To change admin password

    $ python manage.py changepassword admin

and follow instructions

Connect to your site
--------------------

With your favorite browser

http://localhost:8000

admin / yourpassword
 
