Files @ d7c64b3800af
Branch filter:

Location: conntrackt/docs/quickstart.rst

d7c64b3800af 2.4 KiB text/prs.fallenstein.rst Show Annotation Show as Raw Download as Raw
branko
CONNT-25: Updated documentation:

- Marked Django 1.11.x as the only supported Django version.
- Updated some copyright notices.
- Updated installation and quick-start instructions for use with new
version of Django.
- Removed unneeded warning about pip version.
- Updated instructions to emphasize that 'crispy_forms' must be
included in list of installed applications.
- Added dedicated section for upgrade instructions. Covered some
general principles and upgrade from 0.3.x to 1.0.x.
- Updated release notes.
- Added information about Graphviz being the external dependency.
.. Copyright (C) 2013-2017 Branko Majic

   This file is part of Django Conntrackt documentation.

   This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
   Unported License. To view a copy of this license, visit
   http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
   Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.


Quick-start guide
=================

This chapter provides quick-start instructions in order to allow you to quickly deploy and test Django Conntrackt application.


Debian/Ubuntu
-------------

Install the required distribution packages::

  sudo apt-get install python2.7 graphviz virtualenv virtualenvwrapper

Open up a new shell to make sure the ``virtualenvwrapper`` is now
active.

Create the virtual environment for testing Django Conntrackt::

  mkvirtualenv conntrackt

Install Django Conntrackt with its requirements::

  workon conntrackt
  pip install django-conntrackt

Start a new Django Conntrackt project::

  django-admin.py startproject conntrackt_test

Edit configuration file ``conntrackt_test/conntrackt_test/settings.py`` to set-up
some basic settings:

#. Under ``INSTALLED_APPS`` append lines::

     'crispy_forms',
     'braces',
     'conntrackt',

Edit the URL configuration file ``conntrackt_test/conntrackt_test/urls/.py`` to
set-up the URLs for the admin website and Conntrackt itself:

#. At the top of the file, add line ``from django.http import HttpResponseRedirect``.
#. Under ``urlpatterns`` append lines::

     url(r'^$', lambda r : HttpResponseRedirect('conntrackt/')),
     url(r'^conntrackt/', include('conntrackt.urls')),

Set-up the database for the project::

  cd conntrackt_test/
  python manage.py migrate

You will be prompted to provide some additional information:

#. When prompted to create a superuser, answer ``yes``.
#. Provide the desired username when prompted for it.
#. Provide the desired e-mail address when prompted for it.
#. Provide the desired password for created user.

After this the project is fully configured to run Django Conntrackt. Run the
Django development server (good enough for testing, but don't use it in
production)::

  python manage.py runserver

You can now explore the functionality of Djang Conntrackt at::
  http://localhost:8000/

If you have any problems getting around and understanding how the applications
works, have a look at the :ref:`usage guide <usage>`.