diff options
Diffstat (limited to 'docs/_build/html/_sources')
-rw-r--r-- | docs/_build/html/_sources/administration.txt | 209 | ||||
-rw-r--r-- | docs/_build/html/_sources/configuration.txt | 185 | ||||
-rw-r--r-- | docs/_build/html/_sources/customisation.txt | 52 | ||||
-rw-r--r-- | docs/_build/html/_sources/import_export.txt | 233 | ||||
-rw-r--r-- | docs/_build/html/_sources/index.txt | 17 | ||||
-rw-r--r-- | docs/_build/html/_sources/install-1.x.txt | 353 | ||||
-rw-r--r-- | docs/_build/html/_sources/install.txt | 290 | ||||
-rw-r--r-- | docs/_build/html/_sources/upgrade.txt | 319 |
8 files changed, 0 insertions, 1658 deletions
diff --git a/docs/_build/html/_sources/administration.txt b/docs/_build/html/_sources/administration.txt deleted file mode 100644 index 672caa9..0000000 --- a/docs/_build/html/_sources/administration.txt +++ /dev/null @@ -1,209 +0,0 @@ -.. -*- coding: utf-8 -*- -.. _administration: - -============== -Administration -============== - -:Author: Étienne Loks -:date: 2012-11-28 -:Copyright: CC-BY 3.0 - -This document presents the administration of Chimère. -It has been updated for version 2.0.0. - - -Administration pages presentation ---------------------------------- - -Administration pages are accessible at: http://where_is_your_chimere/admin/ - -Don't forget the ending slash in the URL. - -Identification -************** - -First of all, you'll have to identify yourself with the login and password -provided. - -.. image:: _static/chimere_admin_00.png - - -Main page -********* - -Once authentified you'll have access to the main admin page. - -It looks like this: - -.. image:: _static/chimere_admin_01.png - -#. links to this **Documentation**, to the **Change password** form and to - **Log out**, -#. the list of recent actions made with this account, -#. an application title, most of your action will be in the **Chimere** - application, -#. an item inside the application. From these pages you can **Add** a new item or - consult/**Change** items. The **Add** link leads to the new `Item form`_. The - **Change** link leads to the `Item list`_. The `Item list`_ is also available - by clicking on the item label. - - -Item list -********* - -.. image:: _static/chimere_admin_02.png - -#. path in the admin site. This is a convenient shortcut to come back to the - main page, -#. link to create a new item from the item list, -#. search items by words (not available for all item types), -#. this filter box permits to filter current entries with some criteria (not - available for all type of items), -#. the header of the table is clickable. Clicking on an header sorts the items by - this header (ascending or descending). Multiple header sort is possible (the - number on the right of the header explains the sorting order), -#. each item can be checked (for applying an action) or selected (by clicking on - the first column) to see the detail and edit or delete it. - -Item form -********* - -.. image:: _static/chimere_admin_03.png - -#. fields for the selected item (or blank if it is a new item) are displayed in - this form. A few fields are read-only and another few are hidden. Mandatory - fields have their label in bold. Changes on these fields are only effective - once the form is submitted. -#. for some items there are associated sub-items. These associated items can be - modified in this form. If there are many sub-items associated for the current - item, they can be ordered by drag and drop. -#. the form has to be validated by one of these action buttons. They are - self-explanatory. - -Status -****** - -*Status* is a property attached to each geographic item in Chimère. To -administrate efficiently Chimère you need to understand the mean of each status. - -- **Submitted**: Status of a new item freshly proposed by an end user. This item - is not visible on the map. -- **Available**: Status of an item visible on the map. -- **Disabled**: Status of a discarded item. -- **Modified**: Status of an amendment proposed by an end-user. -- **Imported**: Status of a newly imported item. Import and export operations - need that all items with *imported* status are treated (validated, disabled - or deleted). - - -Managing news -------------- - -A news system is available. -All you have to to do is to click on the **Add** button near News. -For each news you have to provide a name and a content. The content can contain -HTML tags. -The availability is set with a checkbox. - -Creating categories/subcategories ---------------------------------- - -Before adding categories you have to set some icons. These icons appear on the -map and in the categories' box on the main map. -Be careful to resize correctly your icons. Indeed the icon will be presented at -their real size on the map. -To add icons: the **Add** button near Icons. - -Categories are in fact only containers for subcategories. You'll have to provide -only a name and an order. -To add categories: the **Add** button near categories (quite clear now, isn't -it?) - -Fields of subcategories are: an associated category, a name, an icon, an order, -a color and an element type. -These fields are mainly quite self- explanatory. -The color is used to draw routes (if this subcategory contains routes). If it a -basic color it can be set with the English name (for instance: *red*, *blue*, -*yellow* or *purple*) otherwise you can put the HTML RVB code (for instance -*#9227c9*). -The element type is the type of element that the subcategory can contain: POI, route -or both. - -.. _geographic-items-management: - -Editing or moderating items ---------------------------- - -The moderation step is quite simple. It works the same with POIs and routes. -The moderator can access to all POIs (or routes) by clicking on them on the -list. - -A search field is available to search by name but the more interesting is to -filter POIs (or route) by state and by subcategory. - -There are some actions available in the action list: - -- **Delete**: to delete selected items. A confirmation step is displayed, -- **Validate**: to set the status *Available* to selected items, -- **Disable**: to set the status *Disabled* to selected items. This is useful to - keep items you don't want to be exposed on the map, -- **Managed modified items**: to manage the amendment made by end users on the - main site (cf. :ref:`managing-modified`). Modified item has to be treated - one by one, -- **Export to...**: to export selected item to the selected format. - - -To modify an item, classically you have to click on its name. -Then you access to a form to freely modify the item. - -.. image:: _static/chimere_admin_modify_item.png - -In this form there are all data available to the end user form plus some extra -fields. - -- The *Import fields* only make sense with data imported from an external - source or for data to be exported to OSM (cf. the :ref:`import section - <importing>` of this documentation), -- *Associated items fields* are read-only fields that list items associated to - the current one (for example the reference item of an amendment or an associated - file of a route). - -Associated multimedia items are at the bottom of the form. You can freely add, -change items and change their order with drag and drop. - -Don't forget to validate your change with one of the **Save** buttons at the -bottom of the form (it is easily forgotten when you change multimedia items). - -If an item is not relevant the **Delete** button enables to remove it. - -.. _managing-modified: - -Managing end user amendment ---------------------------- - -Amendment can be proposed on the main site by end-users. -In Chimère an amendment is a new item with the status *Modified* and with a link -to the reference item modified. - -.. Note:: - If you are logged as an administrator and make changes on the map with the - end user form they will be directly validated. - -A special form has been developed to facilitate the processing of these -modified items. - -You can access to this special form with the action *Managed modified items*. - -.. image:: _static/chimere_admin_modified_management.png - -This form is a table with three columns: - -#. The first column displays the information for the reference item, -#. The second column displays the information proposed by the submitter, -#. The third column is a list of checkboxes. For each row checked, after the - validation, the value of the modified item will replace the value of the - reference item. - -.. Note:: - To reject all modifications validate the form with no checkbox checked. diff --git a/docs/_build/html/_sources/configuration.txt b/docs/_build/html/_sources/configuration.txt deleted file mode 100644 index 3aa34ac..0000000 --- a/docs/_build/html/_sources/configuration.txt +++ /dev/null @@ -1,185 +0,0 @@ -.. -*- coding: utf-8 -*- - -============= -Configuration -============= - -:Author: Étienne Loks -:date: 2012-10-08 -:Copyright: CC-BY 3.0 - -This document presents the first steps to configure your Chimère. -It has been updated for version 2.0.0. - -Your session has to be initialised with these environment variables in -the Command Line Interface:: - - CHIMERE_PATH=/srv/chimere # change with your installation path - CHIMERE_LOCALNAME=mychimere # change with your local project name - CHIMERE_APP_PATH=$CHIMERE_PATH/$CHIMERE_LOCALNAME - - -Once the application installed, there are a few simple steps to follow to -configure *your* Chimère. - -Most of these steps are done in the web administration pages. - -If you are not familiar with *Django-like* administration pages you can look -at the first paragraph of :ref:`administration` where it is presented. - -To access these pages you have to identify with an account with *staff* and -*superuser* status. - -A *superuser* account is created at the initialization of the database. - -Configuring the sites framework -------------------------------- - -*Sites* framework allow you to serve the same content on different domains. -Most of you will probably use only one domain but this unique domain has to -be configured. This is done in the web administration interface in *Sites > Sites*. -You only need to change *example.com* by your domain name. If you forget to -do that, some functionalities such as RSS feeds will not work properly. - -.. _managing-areas: - -Managing areas --------------- - -An *Area* is the base of your map. It defines: - -* a name: a human readable label for this area, -* an associated URN (*not mandatory*): the name of the area as a web ressource. - In practice, if the area is not the default area the URN is used at the end of - the default URL to access to this area. This is not mandatory but necessary - for each area that is not the default one, -* a welcome message (*not mandatory*): this message is displayed once a day per - user arriving on the map, -* an order (to sort areas), -* an availability, -* a default state. The /default/ area is viewed by default. Only one area can - be the default: activating this state disables it on the possible other area - with a default state, -* default checked categories (*not mandatory*), -* if categories are displayed dynamically (if dynamically is set, the end user - only views categories which have items on the map section he is currently - looking at), -* categories restriction (*not mandatory*): if no restriction is set all - categories are available, -* an external CSS file (*not mandatory*): an URL to an external CSS file, -* restriction on the bounding box: if set to restricted, the end user can't pan - outside the defined bounding box. Due to technical reasons of OpenLayers, there - is at this time no restriction on the zoom, -* a map bounding box: this is the area to display when arriving on the map. If - the area is restricted it will be the bounding box that restricts the end user. - Hold the control key, click and drag to draw the bounding box, -* available layers (*not mandatory*; OSM Mapnik is used by default): OSM Mapnik - render, OSM MapQuest render, OSM Transport Map render, OSM CycleMap are - available by default. You can add new custom layers (cf. :ref:`managing-layers`). - -*Areas* are customizable directly on the web administration interface in -*Chimere > Areas*. - -As there is little chance that the default area should be appropriated for you, -you'll have to set at least one default area. - -Adding many areas can be a mean to show your map in different flavors. - -Managing users --------------- - -If you are not the only administrator/moderator of this Chimère installation -you have to create and manage account for the other users. - -You can create a new *superuser* account with the Command Line Interface (CLI):: - - ./manage.py createsuperuser - -User password can be changed with the CLI (useful if you have forgotten your -password):: - - ./manage.py changepassword username - -*Users* are customizable directly on the web administration interface in -*Auth/User*. - -To create a new account, simply click on the Add button near Users. Give a name -and a default password (the user can change it on his own later). - -Then complete the other pieces of information. - -Check the case: *Staff status* (or this user will not be able to log to the -administration website). - -If this account is a new technical administrator, check *Superuser status* (this -user must be trustworthy!). Otherwise you'll have to give permissions to this -new user. It is easier not to add permission manually but to make this user -a member of a group. - -Two types of default group are proposed: application administrator and moderator. - -Moderator are limited to an *Area* (they only see items that are inside the -bounding box). If a moderator manages many areas you'll have to select many -groups. - -Detail of rights for default groups: - -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Task (add/modify/delete on) | Technical administrator | Application administrator | Moderator | -+=========================================+=========================+===========================+===========+ -| User | yes | no | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Group | yes | no | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Property model | yes | no | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Import | yes | no | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Layer | yes | no | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| News | yes | yes | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Area | yes | yes | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Icon | yes | yes | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Color/Color theme | yes | yes | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Category/Subcategory | yes | yes | no | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Point Of Interest | yes | yes | yes | -+-----------------------------------------+-------------------------+---------------------------+-----------+ -| Route | yes | yes | yes | -+-----------------------------------------+-------------------------+---------------------------+-----------+ - - -Creating property models ------------------------- - -A basic installation of Chimère permits to associate a name, a category, a -description, dates, multimedia files, picture files, etc. for each geographic -item. - -You may want to add more custom fields like phone number or opening hours. For -that all you have to do is to add a new property model (*Chimere/Property -model*). - -The administration page asks you for: - -* a name, -* an order (to sort properties), -* an availability to the end user (this can be used to set hidden properties), -* a mandatory status, -* the categories the property applies to (if no categories selected it applies - to all), -* the type: text, long text, password or date. - -To make this property available it is necessary to reload your web server (the -property is cached). - -All forms are then automatically updated with this new field. - -If you don't want to allow add and modification of properties you can disable -this form by setting CHIMERE_HIDE_PROPERTYMODEL to *True* in your -*local_settings.py* file. - diff --git a/docs/_build/html/_sources/customisation.txt b/docs/_build/html/_sources/customisation.txt deleted file mode 100644 index 665e2f8..0000000 --- a/docs/_build/html/_sources/customisation.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. -*- coding: utf-8 -*- - -============= -Customisation -============= - -:Author: Étienne Loks -:date: 2012-11-28 -:Copyright: CC-BY 3.0 - -This document presents the customisation of Chimère. -It has been updated for version 2.0.0. - - -.. _managing-layers: - -Managing layers ---------------- - -There are some different layers available by default in Chimère (OSM Mapnik, OSM -Mapquest, OSM Transport map, OSM Cyclemap). You can add some extra layer using -the web administration pages of Chimère. The new layer is defined with the -appropriate `Openlayers <http://openlayers.org/>`_ JS code. This JS code must -be a compatible Openlayers Layer instance with no ending semi-colon. For -instance defining a Bing layer can be done with this kind of code:: - - new OpenLayers.Layer.Bing({ - name: "Aerial", - key: "my-bing-API-key", - type: "Aerial"}) - - -Refer to the `Openlayers documentation API -<http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers-js.html>`_ -for more details. - - -Customizing the layout and the design -------------------------------------- - -If you only want to customize the CSS, the easiest way to do it is to add a -link to an extra CSS to your *Areas* cf. :ref:`managing-areas`. - -If you want to do larger changes in the layout and the style the (well named) -example_project can be customized to fit your needs. Each template file present -in the *chimere/templates* directory can be copied in your *myproject/templates* -directory and then modified. -You only need to copy files that you want to modify. These files are in -Django template language mainly made of pure HTML with some logic. Refer to -the `Django template documentation <https://docs.djangoproject.com/en/1.4/ref/templates/>`_ -for more details. - diff --git a/docs/_build/html/_sources/import_export.txt b/docs/_build/html/_sources/import_export.txt deleted file mode 100644 index bc422b1..0000000 --- a/docs/_build/html/_sources/import_export.txt +++ /dev/null @@ -1,233 +0,0 @@ -.. -*- coding: utf-8 -*- - -============= -Import/export -============= - -:Author: Étienne Loks -:date: 2012-11-28 -:Copyright: CC-BY 3.0 - -This document presents the administration of Chimère. -It has been updated for version 2.0.0. - -.. _importing: - -Importing ---------- - -In Chimère the import mechanism is based on **Import object**. These objects -are stored in database to keep trace of imports and to facilitate the -re-importation from the same source. In fact if possible the update of data from -a same type of source is managed. - -.. Note:: - The ability to do such updates depends on the existence of a unique id - for each object on your source. - -To add an **Import object** you need to go to *Chimere > Imports* then **Add**. - -After that you'll have to select your source type and then the form depends on -this source type. - -Common fields -************* - -- **Name by default**: if no name can be identified to the newly imported object - this is the name that will be used. If this field is empty the name of the - associated category will be use. -- **SRID**: Chimère will try to identify automatically the correct projection - from the given source. But sometimes the information is not present or cannot - be guessed (for instance a shapefile that uses non standard proj file). In - this case Chimère will use WGS84 by default (the classic latitude/longitude) - but it is not always correct. If you experience problems with items - localisation you should put here the SRID associated to the projection of - your source. -- **Origin**: if not null this field will be associated to each item imported in - order to easily identify where the item came from. For OSM import the source - is automatically added. -- **License**: if not null this field will be associated to each item imported in - order to easily identify the license associated to the item. For OSM import - the license is automatically added. -- **Associated subcategories (mandatory)**: The selected subcategories will be - associated to newly imported items. - - -KML import -********** - -.. image:: _static/chimere_admin_import_KML.png - - -- **Web address/source file (mandatory)**: your KML could be distant or a local - file. You'll have to fill one of the two fields. -- **Filter**: if you want to import only a specific *Folder* of your KML file - put his name on this field. -- **Zipped file**: if your source is a KMLZ file (a zipped KML), check this case. - -Shapefile import -**************** - -.. image:: _static/chimere_admin_import_shapefile.png - - -- **Web address/source file (mandatory)**: your shapefile could be distant or a - local file. You'll have to fill one of the two fields. -- **Zipped file**: only zipped shapefiles are accepted so this checkbox has to be - checked. - -GeoRSS import -************* - -Simple GeoRSS and W3C GeoRSS are managed. - -.. image:: _static/chimere_admin_import_georss.png - -- **Web address (mandatory)**: only distant GeoRSS are managed. - -CSV import -********** - -The format of the CSV file (number and order of columns) managed by Chimère -varies depending on the properties you have added on your Chimère instance. -So we recommend you to first do an export of some items in CSV with Chimère. -The CSV format of the exported file will meet Chimère requirements. - -By the way because of the geometry of the item this format is not very -convenient to add new content but could be handy to update informations. - -.. Warning:: - If you mean to update existing data by this import, do *not* modify the - geometry column. - -.. image:: _static/chimere_admin_import_CSV.png - -- **Web address/source file (mandatory)**: your CSV file could be distant or a - local file. You'll have to fill one of the two fields. - -.. _osm-import: - -OpenStreetMap import -******************** - -.. image:: _static/chimere_admin_import_OSM.png - -To import from OSM Chimère use the XAPI API of OSM. - -- **Web address (mandatory)**: XAPI url used to import data. This field should - be filled with a default address. By default the MapQuest server is used as it - seems to be the more robust. If you experience problems with OSM import, check - the availability of the XAPI server used and eventually change it. -- **Filter area (mandatory)**: draw the bounding box you want to use for your - OSM import. -- **Filter type (mandatory)**: choose if you want to import way or nodes. -- **Filter tag (mandatory)**: choose the OSM key/value couple used to filter OSM - data. A link to the `OSM Map features page - <https://wiki.openstreetmap.org/wiki/Map_Features>`_ is provided to help you - find appropriate values. -- **Refresh button**: this button convert your choices to appropriate XAPI args. - You have to hit this button before validating the form. - -Importing -********* - -Once your new import item created, select it in the import object list, choose -the **Import** action and validate. - -The import should be processing normally. If not, an explicit error message -should be printed in the state column of your import. - -You can also launch imports with the CLI (ideal for crontab jobs). In the -project directory you only need to launch the command:: - - ./manage.py chimere_import <import_id> - -- *import_id* is the import ID - -If you launch the command without *import_id* the list of imports available is -presented and you can choose one. - -Managing imported data -********************** - -All new imported items have the state **Imported**. To make them available on -the map you'll have to validate them. If you don't want some items to be visible on -the map, instead of deleting them it is recommended to set them to the state -**Disabled**. - -.. Warning:: - Be careful with duplicates between your existing data and imported data. This - is particularly important if you want to export your data to OSM. - -Exporting ---------- - -Export to CSV/KML/Shapefile -*************************** - -Directly from the :ref:`geographic items list <geographic-items-management>` you -can export to the chosen format. All you have to do is to select the desired -items, choose the appropriate action in the action list and validate. - -You can also launch exports with the CLI (ideal for crontab jobs). In the -project directory you only need to launch the command:: - - ./manage.py chimere_export <subcategory_id> <CSV|KML|SHP> \ - <marker|route> <filename> - -- *subcategory_id* is the ID of the chosen subcategory -- *CSV|KML|SHP* is the chosen format -- *marker|route* is to get marker or route -- *filename* is the output filename - -If you launch the command without arguments you will be prompted for the choice -to make for your export. - - -Export to OSM -************* - -.. Warning:: - If you are not sure of what you are doing with OSM export: don't do it! It is - really important to not mess with others' data. - -.. Note:: - Only export of OSM nodes are managed. - -OSM export is not that easily managed. First (if not yet done) you'll have to -define an import (:ref:`see above <osm-import>` for details). This will enable -to determine: - -- the area concerned by your export. -- the key/value tag to append to your new/updated items. -- the subcategories concerned by your export. If you think that some items in - these subcategories should not be in OSM database (because there are not - relevant or because of license issues) beforehand mark them as **Not for OSM** - in the *import fields* of the :ref:`geographic items forms - <geographic-items-management>`. - - -The OSM export in Chimère is designed to be the more preservative possible in -regards to OSM database. That's why before any export an import is done. If -the new import has updated data, these new data will overload data in your -Chimère (if you don't want that: don't do export). All pending imported items -should have been treated before doing an export. - -To launch an export select the appropriate Import object in the imports list. -Then select the **Export to OSM** action and validate. -Then you'll be asked for your OSM username and password and the API you want to -use. If you regularly use Chimère to do export, it is recommended to create an -OSM specific account for that. -The test API is available to make export test. If you want to use the test -API you'll have to create a specific account on the test platform. - -.. Warning:: - The data on the test platform are not synced with the main platform. You won't - have the same data than the ones you got with XAPI. - -Once all this field filled, you can (finally!) launch the export. - -When exporting tags are automatically added/updated: - -- *name*: get from the item name in Chimère. -- *source*: to identify Chimère as a source. diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt deleted file mode 100644 index ee1dd6f..0000000 --- a/docs/_build/html/_sources/index.txt +++ /dev/null @@ -1,17 +0,0 @@ -.. Chimère documentation master file, created by - sphinx-quickstart on Wed Feb 15 00:42:28 2012. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Chimère's documentation! -=================================== - -.. toctree:: - :maxdepth: 2 - - install - upgrade - configuration - administration - import_export - customisation diff --git a/docs/_build/html/_sources/install-1.x.txt b/docs/_build/html/_sources/install-1.x.txt deleted file mode 100644 index 4c8a5b8..0000000 --- a/docs/_build/html/_sources/install-1.x.txt +++ /dev/null @@ -1,353 +0,0 @@ -.. -*- coding: utf-8 -*- - -======================================== -Chimère installation (old documentation) -======================================== - -:Author: Étienne Loks -:date: 2012-02-15 -:Copyright: CC-BY 3.0 - -This documents presents the installation of Chimère for version 1.x. This -documentation is no longer relevant for version 2. - ------------------ -Base installation ------------------ - -Installation ------------- - -Prerequisites -************* - - - `apache <http://www.apache.org/>`_ version 2.x with [mod_python http://www.modpython.org/] 3.x - - - `python <http://www.python.org/>`_ versions 2.6 or 2.7 - - - `geodjango <http://www.djangoproject.com/>`_ version 1.0 - - - `postgres <http://www.postgresql.org/>`_ version 8.x - - - `gettext <http://www.gnu.org/software/gettext/>`_ - - - `psycopg2 <http://freshmeat.net/projects/psycopg/>`_ - - - `Python Imaging Library <http://www.pythonware.com/products/pil/>`_ - - - `Beautiful Soup <http://www.crummy.com/software/BeautifulSoup/>`_ - - - `lxml <http://lxml.de/>`_ - -geodjango is a part of django version 1.0 but it has some specific (geographically related) additionnal dependencies: - - - `geos <http://trac.osgeo.org/geos/>`_ 3.0.x - - - `proj.4 <http://trac.osgeo.org/proj/>`_ 4.4 to 4.6 - - - `posgis <http://postgis.refractions.net/>`_ versions 1.2.1 or 1.3.x - - - `gdal <http://www.gdal.org/>`_ - - -Optionaly (but recommanded): - - - `tinymce <http://tinymce.moxiecode.com/>`_ - - - `gpsbabel <http://www.gpsbabel.org/>`_ - - -The simpliest way to obtain these packages is to get them from your favorite Linux distribution repositories (for instance python, python-django, python-beautifulsoup, tinymce, apache2, libgeos-3.2.0, proj, gdal-bin, python-gdal, python-lxml, python-psycopg2, python-imaging, gettext, postgresql-8.4 and postgresql-8.4-postgis packages for Debian Squeeze). If these packages do not exist in your distribution's repository, please refer to the applications' websites. - -Database configuration -********************** - -Now that postgres and postgis are installed, you need to create a new user for chimere:: - - createuser --echo --adduser --createdb --encrypted --pwprompt chimere-user - -Then, you have to create the database, and initialize the geographic types (adapt the paths accordingly to your needs):: - - createdb --echo --owner chimere-user --encoding UNICODE chimere "My Chimère database" - createlang plpgsql chimere - psql -d chimere -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql - psql -d chimere -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql - -Getting the sources -******************* - -The last "stable" version is available in this `directory <http://www.peacefrogs.net/download/>`_. - -Another solution is to get the last git version:: - - git clone git://www.peacefrogs.net/git/chimere - git tag -l # list tagged versions - git checkout v1.0.0 # checkout the desired version - - -Install the sources -******************* - -Unpack and move the files in an apache user (www-data for Debian) readable directory:: - - sudo mkdir /var/local/django - cd /var/local/django - sudo tar xvjf /home/etienne/chimere-last.tar.bz2 - sudo chown -R etienne:www-data chimere - -In your chimere application directory create settings.py to fit to your configuration. -A base template is provided (settings.py.example):: - - cd chimere/chimere/ - cp settings.py.example settings.py - vim settings.py - #### - PROJECT_NAME = u'Chimère' - - ROOT_PATH = '/var/local/django/chimere/chimere/' # path to the installation of Chimère - - SERVER_URL = "http://www.peacefrogs.net/" # root of the web address of Chimère - EXTRA_URL = 'chimere/' # suffix to the web address of Chimère - BASE_URL = SERVER_URL + EXTRA_URL - EMAIL_HOST = 'localhost' # smtp of an email server to send emails - - TINYMCE_URL = SERVER_URL + 'tinymce/' - - # chimere specific - DEFAULT_CENTER = (-1.679444, 48.114722) # default center of the map - EPSG_PROJECTION = 900913 # projection used for data exchange (JSON flow) - EPSG_DISPLAY_PROJECTION = 4326 # projection used to display on the map - - # default id category to check on the map - DEFAULT_CATEGORIES = [1] # list of default category ids checked on the map - - # JS definition of the main map cf. OpenLayers documentation for more details - # to begin you can leave the default OpenStreetMap map rendered with Mapnik - MAP_LAYER = "new OpenLayers.Layer.OSM.Mapnik('Mapnik')" - - # setting the appropriate language code for your site - LANGUAGE_CODE = 'en-gb' - - # database configuration - DATABASE_ENGINE = 'postgresql_psycopg2' # leave it to 'postgresql_psycopg2' - DATABASE_NAME = 'chimere' # database name - DATABASE_USER = 'chimere-user' # database user - DATABASE_PASSWORD = 'mypassword' # database password - DATABASE_HOST = '' # set to empty string for localhost - - DATABASE_PORT = '' # set to empty string for default - - #### - -If you want to use tinymce don't forget to make it available to Chimère. - -In this same chimere directory, make a symbolic link to django's basic styles (do not forget to change the path according to your configuration, it is the last time I will recall it to you. Next time, you are on your own!):: - - ln -s /usr/share/pyshared/django/contrib/admin/media/ . - -Compiling languages -******************* - -If your language is available in the locale directory of chimere, you will just need to get it compiled. Still being in the chimere directory, this can be done with (here, "de" stands for german. Replace it with the appropriate language code):: - - django-admin compilemessages -l de - -If your language is not available, feel free to create the default po files and to submit it, contributions are well appreciated. Procedure is as follows : - -You first need to create the default po file (of course, replace "de" according to the language you chose to create):: - - django-admin makemessages -l de - -There should now be a django.po file in locale/de/LC_MESSAGES. Complete it with your translation. - -Now that the translation file is completed, just compile it the same way you would have if the language file was already available. - -Database initialisation -*********************** - -Create the appropriate tables (still being in chimère application directory):: - - ./manage.py syncdb - -You will be prompted for the creation of an administrator account (administration can be found at: http://where_is_chimere/admin). -The database is set, congratulations! - -Webserver configuration -*********************** - -Apache configuration with mod_wsgi -++++++++++++++++++++++++++++++++++ - -Install mod_wsgi for apache:: - - sudo apt-get install libapache2-mod-wsgi - - -Create and edit a configuration for Chimère:: - - sudo mkdir /var/local/django/chimere/apache - sudo cp /var/local/django/chimere/docs/conf/django.wsgi /var/local/django/chimere/apache/django.wsgi - sudo cp /var/local/django/chimere/docs/conf/apache-wsgi.conf /etc/apache2/sites-available/chimere - -Adapt the files django.wsgi (with the correct sys path) and chimere. - -To activate the website reload apache:: - - sudo a2ensite chimere - sudo /etc/init.d/apache2 reload - -Apache configuration with mod_python -++++++++++++++++++++++++++++++++++++ - -Install mod_python for apache:: - - apt-get install libapache2-mod-python - -Create and edit a configuration file for Chimère:: - - sudo vim /etc/apache2/sites-available/chimere - -Insert Apache directives for your installation:: - - # part of the address after the root of your site - <Location "/chimere/"> - # directory path to the father of the installation of Chimère - PythonPath "['/var/local/django/'] + sys.path" - SetHandler python-program - PythonHandler django.core.handlers.modpython - SetEnv DJANGO_SETTINGS_MODULE chimere.settings - # set it to on or off if in test or production environment - PythonDebug On - # put differents interpreter names if you deploy several Chimère - PythonInterpreter chimere - </Location> - -To activate the website reload apache:: - - sudo a2ensite chimere - sudo /etc/init.d/apache2 reload - - -Now that you have gone through ALL this configuration procedure (which was not that hard after all) you can configure the site. - ------------------- -Base configuration ------------------- - -When you have installed the application there is a few simple steps to follow to configure *your* Chimère. - -Most of theses steps are done in the administration pages accessible at : http://where_is_chimere/admin -To access theses pages you have to identify you with login and password provided at the initialization of the database. - -Creating users --------------- - -If you are not the only administrator of this Chimère installation you have to create account for the other users. -Currently the process has to be done manualy. - -Simply click on the Add button near Users. Give a name and a default password (the user can change it on in own later). -Then complete the other pieces of information. -Check the case: Member of the staff (or this user will not be able to log to this administration site). -To simply give this user correct rights don't add permission manualy but make this user member of a group. -Two default group are proposed: application administrator and moderator. - -Detail of rights for default user/groups: - -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Task | Application owner | Application administrator | Moderator | -+=========================================+===================+===========================+===========+ -| User add/modify/delete | yes | no | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Group add/modify/delete | yes | no | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Property model add/modify/delete | yes | no | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| News add/modify/delete | yes | yes | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Area add/modify/delete | yes | yes | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Icon add/modify/delete | yes | yes | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Category/Subcategory add/modify/delete | yes | yes | no | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Point Of Interest add/modify/delete | yes | yes | yes | -+-----------------------------------------+-------------------+---------------------------+-----------+ -| Route add/modify/delete | yes | yes | yes | -+-----------------------------------------+-------------------+---------------------------+-----------+ - -Setting the welcome page ------------------------- - -The message has to be set by updating the file templates/welcome.html. -You only have to change the message at the begin of #detail_content. - -Creating property models ------------------------- - -A basic installation of Chimère only permit to associate a name, a category and (for the point of interest) a picture for each point of interest and each route. You may want to add more fields like phone number or opening hours. For that all you have to do is to add a new property model. -The administration ask you for name, order (to order between other properties), availability for the user and type (only text field and long text field are available for the moment). -Then to make this property available it is necessary to restart your application (and then probably to reload Apache). -All forms are then automaticaly updated with this new field. - -Updating the detail window --------------------------- - -When clicking on a POI a window appear with the details. -Particulary if you have set some new property models you may want to customize this window. -Each property is in a paragraph with id: property_i_j (i is the order and j is the model property id - the first model property is id 1 then 2...). -You can simply adapt the CSS file (static/styles.css) to match the desired presentation. -If you want to really change the whole presentation you can change the template file templates/detail.html (go to the Django template documentation for details). - -Updating the design -------------------- - -You can of course customize Chimère with your own CSS. To do that just edit the file static/styles.css. - -After this basic configuration done the harder is done. You can do now application administration tasks. - -------------------- -Site administration -------------------- - -The explanation are to create new elements. To modify these elements it is the same if only some fields are already filled. - -Creating news -------------- - -A news system is available. -All you have to to do is to click on the Add button near News. -For each news you have to provided a name and a content. The content can contain HTML tags. -The avaibility is set with a checkbox. - -Creating categories/subcategories ---------------------------------- - -Before adding categories you have to set some icons. Theses icons appears on the map and in the categories' box on the main map. -Be careful to resize correctly your icons. Indeed the icon will be presented at their real size on the map. -To add icons: the Add button near Icons. - -Categories are in fact only containers for subcategories. You'll have to provide only a name and an order. -To add categories: the Add button near categories (quite clear now, isn't it?) - -Fields of subcategories are: an associated category, a name, an icon, an order, a color and an element type. -Theses fields are mainly quite self-explainatory. -The color is used to draw routes (if this subcategory contains routes). If it a basic color it can be set with the english name (for instance: "red", "blue", "yellow" or "purple") otherwise you can put the HTML RVB code (for instance "#9227c9"). -The element type is the type of element the subcategory can contain: POI, route or both. - -Creating areas --------------- - -Areas are useful to provide a quick access to a particular town, a district, etc. -To define an area fill a name and move/zoom to the choosed location. Submit it and that's all. - ----------- -Moderation ----------- - -The moderation step is quite simple. It works the same with POIs and routes. -The moderator can access to all POIs (or routes) by clicking on the Modify button. -A search field is available to search by name but the more interesting is to filter POIs (or route) by state and by subcategory. -Then to modify an item you have to click on his name. -The submission can now freely modified. Compared to the main submission interface there is only on field add: the state field. To be publish in the main site the item must have the state: Available. -If an item is not revelant the Delete button permit to remove it. - diff --git a/docs/_build/html/_sources/install.txt b/docs/_build/html/_sources/install.txt deleted file mode 100644 index 3b8fd38..0000000 --- a/docs/_build/html/_sources/install.txt +++ /dev/null @@ -1,290 +0,0 @@ -.. -*- coding: utf-8 -*- - -============ -Installation -============ - -:Author: Étienne Loks -:date: 2012-10-08 -:Copyright: CC-BY 3.0 - -This document presents the installation of Chimère. -It has been updated for version 2.0.0. - -Prerequisites -************* - - - `apache <http://www.apache.org/>`_ version 2.x - - `python <http://www.python.org/>`_ versions 2.6 or 2.7 - - `django <http://www.djangoproject.com/>`_ >= version 1.4 - - `south <http://south.aeracode.org/>`_ - - `postgres <http://www.postgresql.org/>`_ >= version 8.x - - `gettext <http://www.gnu.org/software/gettext/>`_ - - `psycopg2 <http://freshmeat.net/projects/psycopg/>`_ - - `Python Imaging Library <http://www.pythonware.com/products/pil/>`_ - - `pyexiv2 <http://tilloy.net/dev/pyexiv2/>`_ - - `Beautiful Soup <http://www.crummy.com/software/BeautifulSoup/>`_ - - python-simplejson - - python-gdal - - `lxml <http://lxml.de/>`_ - - `jquery <http://jquery.com/>`_ version 1.7.1 or better - - `jquery-ui <http://jqueryui.com/>`_ - - `Universal Feed Parser <https://code.google.com/p/feedparser/>`_ - -geodjango is a part of django since version 1.0 but it has some specific -(geographically related) additional dependencies: - - - `geos <http://trac.osgeo.org/geos/>`_ 3.0.x - - `proj.4 <http://trac.osgeo.org/proj/>`_ 4.4 to 4.6 - - `postgis <http://postgis.refractions.net/>`_ versions 1.2.1 or 1.3.x - - `gdal <http://www.gdal.org/>`_ - - -Optionaly (but recommanded): - - - `tinymce <http://tinymce.moxiecode.com/>`_ - - `gpsbabel <http://www.gpsbabel.org/>`_ - - django-celery if you want to manage large imports - - -The simpliest way to obtain these packages is to get them from your favorite -Linux distribution repositories. For instance on Debian Wheezy:: - - apt-get install apache2 python python-django python-django-south \ - postgresql-9.1 gettext python-psycopg2 python-imaging \ - python-pyexiv2 python-beautifulsoup python-simplejson python-gdal \ - javascript-common python-lxml libjs-jquery libjs-jquery-ui \ - python-feedparser libgeos-3.3.3 proj-bin postgresql-9.1-postgis \ - gdal-bin tinymce gpsbabel python-django-celery - - -On Debian Squeeze (you need to activate backports):: - - apt-get install -t squeeze-backports python-django libjs-jquery - - apt-get install apache2 python python-django python-django-south \ - postgresql-8.4 gettext python-psycopg2 python-imaging \ - python-pyexiv2 python-beautifulsoup python-simplejson python-gdal \ - javascript-common python-lxml libjs-jquery libjs-jquery-ui \ - python-feedparser libgeos-3.2.0 proj-bin postgresql-8.4-postgis \ - gdal-bin tinymce gpsbabel - -The package *python-django-celery* doesn't exist for Debian Squeeze. - -If these packages do not exist in your distribution's repository, please refer -to the applications' websites. - -Database configuration -********************** - -Now that postgres and postgis are installed, you need to create a new user for -Chimère:: - - su postgres - createuser --echo --adduser --createdb --encrypted --pwprompt chimere-user - -Then, you have to create the database and initialize the geographic types (adapt -the paths accordingly to your needs):: - - PG_VERSION=9.1 # 8.4 for debian Squeeze - createdb --echo --owner chimere-user --encoding UNICODE chimere "My Chimère database" - createlang plpgsql chimere # only necessary on Debian Squeeze - psql -d chimere -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/postgis.sql - psql -d chimere -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/spatial_ref_sys.sql - -Installing the sources -********************** - -.. Note:: - If you are considering to contribute on Chimère get the Git master. - -Choose a path to install your Chimère:: - - INSTALL_PATH=/var/local/django - mkdir $INSTALL_PATH - -From an archive -+++++++++++++++ - -The last "stable" version is available in this `directory <http://www.peacefrogs.net/download/chimere/>`_. -Take care of getting the last version in the desired X.Y branch (for instance -the last version for the 1.0 branch is version 1.0.2).:: - - wget http://www.peacefrogs.net/download/chimere -q -O -| html2text - (...) - [[ ]] chimere-1.0.0.tar.bz2 17-Nov-2010 16:51 53K - [[ ]] chimere-1.0.1.tar.bz2 17-Nov-2010 16:51 53K - [[ ]] chimere-1.0.2.tar.bz2 17-Nov-2010 16:51 53K - (...) - - wget http://www.peacefrogs.net/download/chimere/chimere-1.0.2.tar.bz2 - -Download, unpack and move the files in an apache user (www-data for Debian) -readable directory:: - - cd $INSTALL_PATH - tar xvjf chimere-last.tar.bz2 - chown -R myusername:www-data chimere - -From the Git repository -+++++++++++++++++++++++ - -Another solution is to get it from the Git repository:: - - cd $INSTALL_PATH - git clone git://www.peacefrogs.net/git/chimere - cd chimere - git tag -l # list tagged versions - git checkout v2.0 # checkout the desired version - - -Creating a custom project template -********************************** - -There, a default project is provided (*example_project*). Copy and modify -it (or get another project based on Chimère):: - - cd $INSTALL_PATH/chimere - cp -ra example_project mychimere_project - -Your project name is used for the name of the Python package of your template. -As a Python package it should follow the rule of Python variable name: -it must contain at least one letter and can have a string of numbers, letters and -underscores ("_") to any length. Don't use accentuated letters. Don't begin the -name by "_" because it has special significance in Python. - -In your Chimère application directory create *local_settings.py* to fit to your -configuration. -A base template is provided (*local_settings.py.example*) and short descriptions -of the more relevant fields are given below (at least check them). Most of -these settings are initialized in *settings.py*. :: - - cd $INSTALL_PATH/chimere/mychimere_project - cp local_settings.py.sample local_settings.py - vim local_settings.py - -:Fields: - - * DATABASES: parameters for the database - * PROJECT_NAME: name of the project - * SECRET_KEY: a secret key for a particular Django installation. This is - used to provide cryptographic signing, and should be set to a unique, - unpredictable value. **Change it!** - * ROOT_URLCONF: url configuration for your project something like: - 'mychimere_project.urls' - * EMAIL_HOST: smtp of an email server to send emails - * TINYMCE_URL: url to tinymce path (default is appropriate for a Debian - installation with tinymce package installed) - * JQUERY_JS_URLS: list of jquery and jquery-ui javascript urls (default is - appropriate for a Debian installation with libjs-jquery libjs-jquery-ui - packages installed) - * JQUERY_CSS_URLS: list of jquery and jquery-ui CSS urls (default is - appropriate for a Debian installation with libjs-jquery libjs-jquery-ui - packages installed) - * GPSBABEL: path to gpsbabel (default is appropriate for a Debian - installation with gpsbabel package installed) - * TIME_ZONE: local time zone for this installation - * LANGUAGE_CODE: language code for this installation - -Manage media path permission:: - - cd $INSTALL_PATH/chimere/mychimere_project - chown -R user:www-data media - chmod -R g+w media - -Create log file:: - - mkdir /var/log/django - touch /var/log/django/chimere.log - chown -R root:www-data /var/log/django/ - chmod -R g+w /var/log/django/ - -Regroup static files in one path:: - - cd $INSTALL_PATH/chimere/mychimere_project - ./manage.py collectstatic - -Compiling languages -******************* - -If your language is available in the directory *chimere/locale/*, you will just -need to get it compiled. This can be done with the following command (here, -**fr** stands for French, replace it with the appropriate language code):: - - cd $INSTALL_PATH/chimere/chimere/ - django-admin compilemessages -l fr - -If your language is not available, feel free to create the default po file and -to submit it, contributions are well appreciated. Procedure is as follows: - -You first need to create the default po file (of course, replace **fr** -according to the language you choose to create):: - - django-admin makemessages -l fr - -There should now be a *django.po* file in *locale/fr/LC_MESSAGES*. Complete it -with your translation. - -Now that the translation file is completed, just compile it the same way you -would have if the language file was already available. - -Database initialisation -*********************** - -Create the appropriate tables (still being in your Chimère project directory):: - - cd $INSTALL_PATH/chimere/mychimere_project - ./manage.py syncdb - -You will be prompted for the creation of an administrator account -(administration can be found at: http://where_is_chimere/admin/). Then you have -to create tables managed with Django-South:: - - ./manage.py migrate - -The database is set, congratulations! - -If you want to populate your installation with default data (don't do this on -an already populated instance!):: - - ./manage.py loaddata ../chimere/fixtures/default_data.json - -Webserver configuration -*********************** - -Apache configuration with mod_wsgi -++++++++++++++++++++++++++++++++++ - -Install *mod_wsgi* for Apache:: - - apt-get install libapache2-mod-wsgi - - -Create and edit a configuration for Chimère:: - - cp $INSTALL_PATH/chimere/apache/django.wsgi \ - $INSTALL_PATH/chimere/apache/mydjango.wsgi - vim $INSTALL_PATH/chimere/apache/mydjango.wsgi - cp $INSTALL_PATH/chimere/apache/apache-wsgi.conf \ - /etc/apache2/sites-available/chimere - vim /etc/apache2/sites-available/chimere - # create log dir - mkdir /var/log/apache2/chimere/ - chown www-data /var/log/apache2/chimere/ - -Adapt the files *mydjango.wsgi* (with the correct sys path and the correct -module) and Apache *chimere* (with the correct servername and correct paths). - -To activate the website, reload apache:: - - a2ensite chimere - /etc/init.d/apache2 reload - -If you encounter problem with the upload of files with Unicode chars in their -names, activate the appropriate locale in Apache. On a Debian server with UTF-8 -as default encoding, in the file */etc/apache2/envvars* uncomment the following -line:: - - . /etc/default/locale - - diff --git a/docs/_build/html/_sources/upgrade.txt b/docs/_build/html/_sources/upgrade.txt deleted file mode 100644 index 377e5e7..0000000 --- a/docs/_build/html/_sources/upgrade.txt +++ /dev/null @@ -1,319 +0,0 @@ -.. -*- coding: utf-8 -*- - -======= -Upgrade -======= - -:Author: Étienne Loks -:date: 2012-10-08 -:Copyright: CC-BY 3.0 - -This document presents the upgrade of Chimère. -It has been updated for version 2.0.0. - -.. Warning:: - Before any upgrade backup the database and all your installation files - (specially if you have made changes to them). - -The process for migration requires a basic knowledge of Git and Linux CLI. It is -*not* an easy process. A work is currently done to easy the upgrade in later -versions (>2.0) of Chimère. - -If several versions have been published, you should repeat all upgrading steps. -For instance to upgrade from v1.1 to v2.0 you should first upgrade to v1.2 then -to v2.0. The only optional step is the integration of your customisations. - -The current stable version is 2.0. - -.. Note:: - If you are considering to contribute on Chimère get the Git master. - -The instructions are given for Debian Squeeze and Debian Wheezy. - - -Getting new versions of dependencies ------------------------------------- - -Version 1.1 -> 1.2 -****************** - -.. code-block:: bash - - apt-get install python-lxml libjs-jquery gpsbabel python-gdal - -Version 1.2 -> 2.0 -****************** - -Debian Squeeze -++++++++++++++ -Activate the backports: http://backports-master.debian.org/Instructions/ -Then install the new dependencies:: - - apt-get install -t squeeze-backports python-django python-django-south \ - python-simplejson libjs-jquery-ui python-pyexiv2 \ - python-feedparser javascript-common libjs-jquery - -Debian Wheezy -+++++++++++++ - -.. code-block:: bash - - apt-get install python-django-south python-simplejson libjs-jquery-ui \ - python-pyexiv2 python-feedparser javascript-common - -If you are planning to do major import consider the install of `Celery -<http://celeryproject.org/>`_. - -.. code-block:: bash - - apt-get install python-django-celery python-kombu - -Getting the new sources ------------------------ - -First of all you have to get the new version of the source code. -For the upgrade process, the source code has to be from the Git -repository. - -To simplify further instructions, some environment variables are -initialized. - -.. code-block:: bash - - CHIMERE_PATH=/srv/chimere - CHIMERE_TAG=v1.2.0 # version 1.1 -> 1.2 - CHIMERE_TAG=v2.0-RC3 # version 1.2 -> 2.0 - CHIMERE_TAG=master # version 2.0 -> master - CHIMERE_LOCALNAME=mychimere - -Your local name is used for the name of your local Git branch and the Python -package. As a Python package it should follow the rule of Python variable name: -it must be at least one letter and can have a string of numbers, letters and -underscores ("_") to any length. Don't begin the name by "_" because it has special -significance in Python. - -From a previous Git installation -******************************** - -.. code-block:: bash - - cd $CHIMERE_PATH - git checkout -b $CHIMERE_LOCALNAME # only if you haven't created yet a local branch - git stash # if you have uncommited changes - git checkout master - git pull - git checkout $CHIMERE_LOCALNAME - git rebase $CHIMERE_TAG - -From a previous tarball installation -************************************ - -First remove your old installation and get the Git version: - -.. code-block:: bash - - cd $CHIMERE_PATH - cd .. - rm -rf $CHIMERE_PATH - git clone git://www.peacefrogs.net/git/chimere - cd chimere - git checkout $CHIMERE_TAG - git checkout -b $CHIMERE_LOCALNAME - - -Update basic settings -********************* - -Version 1.1 -> 1.2 -++++++++++++++++++ - -.. code-block:: bash - - CHIMERE_APP_PATH=$CHIMERE_PATH/chimere - vim $CHIMERE_APP_PATH/settings.py - -Add the line (adapted for your jquery and gpsbabel installation): - -.. code-block:: python - - JQUERY_URL = SERVER_URL + 'jquery/jquery-1.4.4.min.js' - GPSBABEL = '/usr/bin/gpsbabel' - # simplify with an error of 5 meters - GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' - -Version 1.2 -> 2.0 -++++++++++++++++++ - -Project template -................ -Create a new project template: - -.. code-block:: bash - - cd $CHIMERE_PATH - cp -ra $CHIMERE_PATH/example_project $CHIMERE_LOCALNAME - CHIMERE_APP_PATH=$CHIMERE_PATH/$CHIMERE_LOCALNAME - -local_settings -.............. -A *local_settings* file is now used. - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - cp local_settings.py.sample local_settings.py - vim local_settings.py - -Report your old settings.py in local_settings.py (at least the database -configuration). -Your *ROOT_URLCONF* must be set to **value_of_your_localname.urls**. - -logs -.... -Logging is now enabled by default in the file */var/log/django/chimere.log*. - -.. code-block:: bash - - mkdir /var/log/django - touch /var/log/django/chimere.log - chown www-data -R /var/log/django - -Static files -............ - -Now static files are managed with *django.contrib.staticfiles*. - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - ./manage.py collectstatic - -Move old static files to the new static directory: - -.. code-block:: bash - - cp -ra $CHIMERE_PATH/chimere/static/* $CHIMERE_APP_PATH/static/ - cp -ra $CHIMERE_PATH/chimere/static/icons/* $CHIMERE_APP_PATH/media/icons/ - cp -ra $CHIMERE_PATH/chimere/static/upload $CHIMERE_APP_PATH/media/ - -Webserver configuration -....................... -If you are using Apache and WSGI to serve your Chimère, change your WSGI -configuration file to point to the correct settings: -**value_of_your_localname.settings**. - -Change your webserver directive to point to the correct static directory from -**your_chimere_path/chimere/static** to -**your_chimere_path/your_local_name/static**. - -Version 2.0 -> master -+++++++++++++++++++++ - -Update settings and static files. - -.. code-block:: bash - - cp $CHIMERE_PATH/example_project/settings.py $CHIMERE_LOCALNAME - ./manage.py collectstatic - -Migrate database ----------------- - -Version 1.1 -> 1.2 -****************** - -Migration scripts test your installation before making changes so you probably -won't have any lost but by precaution before running these scripts don't forget -to backup your database. -You can also make a copy of your current database into a new database and make -the new installation to this new database. - -The gdal binding for python is necessary to run the upgrade scripts (available -in the python-gdal package in Debian). - -If you run the migration scripts in a production environnement stop the old -instance of Chimère before executing the migration script. Perhaps prepare the -web server to point to the new installation before doing the database upgrade -(cf. next paragraph). - -In *settings.py* verify that **chimere.scripts** is in the *INSTALLED_APPS*. - -After that in the chimere directory just execute the script. - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - python ./scripts/upgrade.py - -Version 1.2 -> 2.0 -****************** - -Django South is now used to manage database migrations. - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - ./manage.py syncdb - ./manage.py migrate chimere 0001 --fake # fake the database initialisation - ./manage.py migrate chimere - -A description field is now available for markers. If you would like to move -values of an old *Property model* to this new field, a script is available. - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - ../chimere/scripts/migrate_properties.py - # follow the instructions - -From 2.0 to master -****************** - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - ./manage.py syncdb - ./manage.py migrate chimere - -Update translations -------------------- - -Version 1.1 -> 1.2 -****************** - -.. code-block:: bash - - cd $CHIMERE_APP_PATH - ./manage.py compilemessages - -Version 1.2 -> 2.0 -> master -**************************** - -.. code-block:: bash - - cd $CHIMERE_PATH/chimere - django-admin compilemessages - -Forcing the refresh of visitor's web browser cache --------------------------------------------------- - -If major changes in the javascript has been done between versions, many of your -users could experience problems. There are many tricks to force the refresh -of their cache. One of them is to change the location of statics files. To do -that edit your local_settings.py and change:: - - STATIC_URL = '/static/' - -to:: - - STATIC_URL = '/static/v2.0.0/' - -Then in the static directory: - -.. code-block:: bash - - cd $CHIMERE_APP_PATH/static - ln -s `pwd` v2.0.0 - -Restart the web server to apply this changes. - |