Files @ a40824531f68
Branch filter:

Location: kallithea/docs/usage/git_support.rst

a40824531f68 1.2 KiB text/prs.fallenstein.rst Show Annotation Show as Raw Download as Raw
Thomas De Schampheleire
controllers: don't pass rendered templates in context variables

Some controllers used the followifng pattern:
- render a data template into a context variable
- for partial (ajax) requests, return the contents of this variable
- for full-page requests, render the full page, which expands the value of
the context variable

Instead, avoid context variables let the controller simply render the full or partial page, and let
the full page template include the partial page.

Remove this context variable for templating and use render exclusively.
From templates, use %include instead of context variables.

This in line with the suggestions in the Pylons documentation:
http://pylons-webframework.readthedocs.org/en/latest/helpers.html#partial-updates-with-ajax
.. _git_support:

===========
GIT support
===========


Git support in Kallithea 1.3 was enabled by default. You need to have a git
client installed on the machine to make git fully work.

Although There is one limitation on git usage.

- large pushes requires a http server with chunked encoding support.

if you plan to use git you need to run Kallithea with some
http server that supports chunked encoding which git http protocol uses,
i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app
replacement. Starting from version 1.4 waitress_ is the default wsgi server
used in Kallithea.

To use, simply change change the following in the .ini file::

    use = egg:Paste#http

to::

    use = egg:waitress#main

or::

    use = egg:gunicorn#main


And comment out bellow options::

    threadpool_workers =
    threadpool_max_requests =
    use_threadpool =


You can simply run `paster serve` as usual.


You can always disable git/hg support by editing a
file **kallithea/__init__.py** and commenting out backends

.. code-block:: python

   BACKENDS = {
       'hg': 'Mercurial repository',
       #'git': 'Git repository',
   }

.. _waitress: http://pypi.python.org/pypi/waitress
.. _gunicorn: http://pypi.python.org/pypi/gunicorn