Simple website for Cross triangulaire registration.
Project description
=======
crossix
=======
crossix is a private Django project to handle registration to www.crosstriangulaire.com.
Installation
============
You may install this software from your distribution packages, or through pip:
.. code-block:: sh
$ pip install crossix
Once installed, you must configure it.
The minimal set of settings is the ``[db]`` section of the ``/etc/crossix/config.ini`` file (see below for details).
Once this is configured, you must prepare the database:
.. code-block:: sh
$ crossixctl migrate
This will create the database; the last step is to point your WSGI server to ``crossix.wsgi``.
Configuration
=============
Crossix will read all configuration files matching ``/etc/crossix/*.ini``.
Those are ini-style files, defining the following parameters:
Application (``[app]``)
-----------------------
General behavior of the application.
Options:
``mode``
``str``, the application mode.
Use ``dev`` for local development and ``prod`` otherwise.
``debug``
``bool``, whether to enable debug.
Valid values: ``on``, ``off``
``secret_key``
``str``, **REQUIRED** in ``prod`` mode.
A secret key for Django security hooks
Site (``[site]``)
-----------------
Hosting and URLs.
Options:
``name``
``str``, the name of your site (``crossix``, ``mypaster``, ...).
``base_url``
``str``, where your site is hosted.
A trailing slash is **required**.
``assets_url``
``str``, the URL where assets (CSS, JS, ...) are served.
May be a relative URL.
``admin_mail``
``str``, the email where the admin should be notified.
``allowed_hosts``
``str list``, comma-separated list of valid ``Host:`` HTTP headers.
See Django docs for details.
Database (``[db]``)
-------------------
Required; these define where snippets will be stored.
Valid options are:
``engine``
``str``, the engine to choose.
Must be one of ``sqlite``, ``mysql``, ``postgresql``; default is ``sqlite``.
``name``
``str``, the name of the database, or its path for sqlite.
Defaults to ``/var/lib/crossix/db.sqlite``.
``host``
``str``, the host of the database server.
``port``
``int``, the port of the database server.
``user``
``str``, the login to use to connect to the database server.
``password``
``str``, the password for the database
Examples:
.. code-block:: ini
; A Postgresql configuration; uses default psql port.
[db]
engine = postgresql
name = crossix
host = psql42.local
.. code-block:: ini
; A sample sqlite configuration.
[db]
engine = sqlite
name = /data/replicated/crossix/db.sqlite
Uploads (``[uploads]``)
-----------------------
Options related to private file uploads.
``dir``
``path``, storage folder for uploads.
Must be writable by the WSGI process.
Example: ``/var/www/crossix/uploads``
``serve``
``str``, the file serving mode.
``crossix`` relies on `django-sendfile <https://github.com/johnsensible/django-sendfile>`_
to enhance performance and protection.
Valid options: ``simple``, ``nginx``, ``xsendfile``, ``mod_wsgi``.
``internal_url``
``str``, the internal URL used by django-sendfile to serve the files.
crossix
=======
crossix is a private Django project to handle registration to www.crosstriangulaire.com.
Installation
============
You may install this software from your distribution packages, or through pip:
.. code-block:: sh
$ pip install crossix
Once installed, you must configure it.
The minimal set of settings is the ``[db]`` section of the ``/etc/crossix/config.ini`` file (see below for details).
Once this is configured, you must prepare the database:
.. code-block:: sh
$ crossixctl migrate
This will create the database; the last step is to point your WSGI server to ``crossix.wsgi``.
Configuration
=============
Crossix will read all configuration files matching ``/etc/crossix/*.ini``.
Those are ini-style files, defining the following parameters:
Application (``[app]``)
-----------------------
General behavior of the application.
Options:
``mode``
``str``, the application mode.
Use ``dev`` for local development and ``prod`` otherwise.
``debug``
``bool``, whether to enable debug.
Valid values: ``on``, ``off``
``secret_key``
``str``, **REQUIRED** in ``prod`` mode.
A secret key for Django security hooks
Site (``[site]``)
-----------------
Hosting and URLs.
Options:
``name``
``str``, the name of your site (``crossix``, ``mypaster``, ...).
``base_url``
``str``, where your site is hosted.
A trailing slash is **required**.
``assets_url``
``str``, the URL where assets (CSS, JS, ...) are served.
May be a relative URL.
``admin_mail``
``str``, the email where the admin should be notified.
``allowed_hosts``
``str list``, comma-separated list of valid ``Host:`` HTTP headers.
See Django docs for details.
Database (``[db]``)
-------------------
Required; these define where snippets will be stored.
Valid options are:
``engine``
``str``, the engine to choose.
Must be one of ``sqlite``, ``mysql``, ``postgresql``; default is ``sqlite``.
``name``
``str``, the name of the database, or its path for sqlite.
Defaults to ``/var/lib/crossix/db.sqlite``.
``host``
``str``, the host of the database server.
``port``
``int``, the port of the database server.
``user``
``str``, the login to use to connect to the database server.
``password``
``str``, the password for the database
Examples:
.. code-block:: ini
; A Postgresql configuration; uses default psql port.
[db]
engine = postgresql
name = crossix
host = psql42.local
.. code-block:: ini
; A sample sqlite configuration.
[db]
engine = sqlite
name = /data/replicated/crossix/db.sqlite
Uploads (``[uploads]``)
-----------------------
Options related to private file uploads.
``dir``
``path``, storage folder for uploads.
Must be writable by the WSGI process.
Example: ``/var/www/crossix/uploads``
``serve``
``str``, the file serving mode.
``crossix`` relies on `django-sendfile <https://github.com/johnsensible/django-sendfile>`_
to enhance performance and protection.
Valid options: ``simple``, ``nginx``, ``xsendfile``, ``mod_wsgi``.
``internal_url``
``str``, the internal URL used by django-sendfile to serve the files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crossix-2017.1.1.tar.gz
(761.8 kB
view details)
Built Distribution
File details
Details for the file crossix-2017.1.1.tar.gz
.
File metadata
- Download URL: crossix-2017.1.1.tar.gz
- Upload date:
- Size: 761.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4577582b37a10504486668c3563b1d3410c526c59710e3e42b45822ac6b6f11 |
|
MD5 | bd17e52f20c6d4d13f00b799860f5c77 |
|
BLAKE2b-256 | 91640bedcf162c635441cd1f4f0b33f6ed6bfed2d4185d4116d3ee20207aa8e4 |
File details
Details for the file crossix-2017.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: crossix-2017.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 837.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 346561997607e21f83372f2125355a1d4dd7fd0606884d4734819a768e3bb560 |
|
MD5 | 0a3591992cfa9d09c9a9f8e2eb2fdf74 |
|
BLAKE2b-256 | f5b5ed979c5e899a1e47ce0cbc1cc9d366226d1e4078562b6dbd681a12e4c8eb |