summaryrefslogtreecommitdiff
path: root/docs/install.rst
blob: bba8a2b22f25df2b4d0aad6e485c019fb484608f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
============
Installation
============

.. module:: gnowsys-studio

.. _dependencies:

Dependencies
============

Make sure to install these packages prior to installation :

* `Python 2.x`_ >= 2.5
* `Django`_ >= 1.3
* `django-mptt`_ >= 0.4.2
* `django-tagging`_ >= 0.3.1
* `BeautifulSoup`_ >= 3.2.0
* `django-xmlrpc`_ >= 0.1.3
* `pyparsing`_ >= 1.5.5
* `django-reversion`_ >= 1.5.1
* `django-grappelli`_ >= 2.3.4
* `django-ratings`_ >= 0.3.6
* `rdflib`_ >= 3.0.0
* `django-registration`_ >=0.8
* `django-4store`_ >= 0.3
* `HTTP4Store`_ >= 0.2
* `html5lib`_ >=  0.95
* `PIL`_ >= 1.1.7
* `diff-match-patch`_ >= 20120106


Note that all the dependencies will be resolved if you install
gnowsys-studio with :program:`pip` or :program:`easy_install`,
excepting Django.

.. _getting-the-code:

Getting the code
================

.. highlight:: console

For the latest version of Gstudio use :program:`easy_install`: ::

  $ easy_install gnowsys-studio

or use :program:`pip`: ::

  $ pip install gnowsys-studio

You could also retrieve the last sources from
https://github.com/gnowgi/django-gstudio. Clone the repository
using :program:`git` and run the installation script: ::

  $ git clone git://github.com/gnowgi/gnowsys-studio.git
  $ cd gnowsys-studio
  $ python setup.py install

or more easily via :program:`pip`: ::

  $ pip install -e git://github.com/gnowgi/gnowsys-studio.git#egg=gnowsys-studio

.. _applications:

Applications
============

.. highlight:: python

Then register :mod:`gstudio`, `objectapp`, and these following
applications in the :setting:`INSTALLED_APPS` section of your
project's settings. ::

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.sitemaps',
    'django.contrib.comments',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.sites',
    'mptt',
    'reversion',
    'tagging',
    'django_xmlrpc',
    'grappelli.dashboard',
    'grappelli',
    'gstudio',
    'objectapp',
    'django.contrib.admin',
    'django.contrib.admindocs',
    'django.contrib.staticfiles',
    'djangoratings',
    'registration',
    'graphviz',
    'demo',
    'fourstore',
    'HTTP4Store',
    'html5lib',
    # Uncomment the south entry to activate south for database migrations
    # Please do install south before uncommenting
    # command: sudo pip install south 
    # 'south',
    )

.. _template-context-processors:

Template Context Processors
===========================

Add these following
:setting:`template context processors<TEMPLATE_CONTEXT_PROCESSORS>` if not
already present. ::

  TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.i18n',
    'django.core.context_processors.request',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'gstudio.context_processors.version',) # Optional

.. _urls:

URLs
====

Add the following lines to your project's urls.py in order to display the
site.

Note that the default gnowsys-studio URLset is provided for convenient
usage, but you can customize your URLs if you want. Here's how: ::

urlpatterns = patterns(
    '',
    (r'^$', 'django.views.generic.simple.redirect_to',
     {'url': '/home/'}),
    url(r'^home/', home_view),
    url(r'^more/',more_view),
    url(r'^nodetypes/', include('gstudio.urls')),
    url(r'^objects/', include('objectapp.urls')),
    url(r'^comments/', include('django.contrib.comments.urls')),
    #URL for XMLRPC
    url(r'^xmlrpc/$','django_xmlrpc.views.handle_xmlrpc'),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/gstudio/', include('gstudio.urls.ajaxurls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^objects/admin/', include(admin.site.urls)),
    url(r'^nodetypes/admin/', include(admin.site.urls)),
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^accounts/register/$', register, {'backend': 'gstudio.regbackend.MyBackend','form_class': UserRegistrationForm}, name='registration_register'),

    url(r'^accounts/', include('registration.urls')),

    url(r'^$', 'django.views.generic.simple.redirect_to',
            { 'template': 'index.html' }, 'index'),
    )

.. _static-files:

Static Files
============

Since the version 1.3 of Django, gnowsys-studio uses the
:mod:`django.contrib.staticfiles` application to serve the static files
needed. Please refer to
https://docs.djangoproject.com/en/dev/howto/static-files/ for more
informations about serving static files.

.. _`Python 2.x`: http://www.python.org/
.. _`Django`: https://www.djangoproject.com/
.. _`django-mptt`: https://github.com/django-mptt/django-mptt/
.. _`django-tagging`: https://code.google.com/p/django-tagging/
.. _`BeautifulSoup`: http://www.crummy.com/software/BeautifulSoup/
.. _`pyparsing`: http://pyparsing.wikispaces.com/
.. _`django-xmlrpc`: https://github.com/Fantomas42/django-xmlrpc