blob: b44df7390100cd754fd808daa2921dbb0a0cf79b (
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
|
mga-treasurer
-------------
mga-treasurer is a script that is used to generate a website showing
informations about latest donations received and expenses for Mageia.Org
association.
Configuration file
------------------
The default configuration is stored in the file config_default installed
as /usr/share/mga-treasurer/config. Default configuration values can be
overrided using file /etc/mga-treasurer.conf.
Sources tree
------------
The following files and directories exist in the source tree :
- mktreasurer: main program, installed in /usr/bin. When run generate
all the pages.
- tmpl/: directory containing template for all the pages. Installed as
/usr/share/mga-treasurer/tmpl.
- static/: directory containing static files. Installed as
/usr/share/mga-treasurer/static. The web server should be configured to
make the files from this directory available at some URL. With apache
you can use something like this in your vhost configuration :
Alias /static /usr/share/mga-treasurer/static
The URL where it is available should be set in the configuration in the
staticdir_url variable.
- config_default: default configuration file, installed as
/usr/share/mga-treasurer/config.
- mga-treasurer.conf: example configuration file, installed as
/etc/mga-treasurer.conf.
Testing
-------
For testing, you can set the environement variable MGATRES_CONF to the
path of a default configuration file that will be used instead of
/usr/share/mga-treasurer/config.
JSON files and http headers
---------------------------
So that the json files can be used from pages on other domains with
XMLHttpRequest, the http header Access-Control-Allow-Origin needs to be
set. See this page for details :
https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
To add the header for .json files, you can use something like this in
apache configuration, inside the VirtualHost definition :
<FilesMatch "\.json$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
|