Commit eea43817 authored by Stefan-Ionut Tarabuta's avatar Stefan-Ionut Tarabuta
Browse files

Merge branch 'master' into 'release'

0.6.0

See merge request libreorganize/libreorganize!92
parents 2159381f 508428e8
before_script:
- apt-get update
- apt-get -y install openssh-client git
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
- ssh-keyscan -H 'gitlab.com' >> ~/.ssh/known_hosts
- apt-get -y install git
stages:
- test
......
# Developing LibreOrganize
## Last edited by Kevin Cole (kevin.cole@novawebdevelopment.org) 2020.04.21
### Location, location, location, and environment variables
For those of you learning Django by following the tutorials...
The tutorial suggests starting a project with `django-admin
startproject mysite` which creates a directory tree that looks
something like:
.
└── mysite
├── manage.py
└── mysite
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
However, the `manage.py` file for **LibreOrganize** has been altered
from the one that would have been auto-generated by `startproject`.
Instead, developers need to first install all the LibreOrganize
dependencies listed in `requirements.txt`, one of which is a pip
package `env-file`. `manage.py` uses this module to obtain
_environment_ variables stored in a file named `.env` (located in the
same directory as `manage.py`). Among those environment variables is
the rather **import**ant `DJANGO_SETTINGS_MODULE`.
The value assigned to `DJANGO_SETTINGS_MODULE` allows for a
non-standard location for the _settings_ module. The value is
formatted for use in an `import` statement. For LibreOrganize, the
value, as of when this document was last edited, is
`core.default_settings` which means all of the settings are in
`./core/default_settings.py` rather than `./mysite/settings.py`. All
of the organization of your Django apps cascades from the settings
found in that file.
In addition, `.env` sets some environment variables specific to
LibreOrganize:
* `LO_SECRET_KEY`
* `LO_EMAIL_HOST`
* `LO_EMAIL_USER`
* `LO_EMAIL_PASSWORD`
* `LO_DB_NAME`
* `LO_DB_USER`
* `LO_DB_PASSWORD`
These are intended to be overridden. A few are set to either empty
strings (`""`) or the generic, unthemed, name of the application
itself (`libreorganize`). As other services, for example, a video
meeting server, are incorporated into the core functionality of
LibreOrganize, I'm expecting they too will get default values added
to `.env`.
The `core/` directory not only holds the default settings, but also
the images, HTML templates, and other components that would be common
to all sites built with LibreOrganize. (Personally, I think `common/`
might be a better name. But it's a minor quibble.)
Other directories present include:
* `locale/` which contains subdirectories for non-English translatons,
one subdirectory per language. The language subdirectories are named
using the International Organization of Standardization (ISO)
2-letter abbreviaton codes, [ISO
639-1](https://en.wikipedia.org/wiki/ISO_639-1), in combination with
— if necessary, — the ISO 2-letter country codes [ISO
3166-1
alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). For
example, **en** is **English**, but on occasion, one needs to
distinguish between particular dialects of English -- for example,
between English as used in the United States (**en-US**), and
English as it is used in Great Britain (**en-GB**). In any case, at
the moment, there are only Spanish (**es**) translation files in
`locale/`.
* `tests/` which includes the functional and unit tests for
development.
* `apps/` which contains 99% of the functionality of LibreOrganize
sites. Each directory in `apps/` represents a feature or component
of LibreOrganize, such as **membership** management, **wiki** pages
and calendar **events**. Each component has a `models.py` to
describe the data for the component as fields in database tables,
a `views.py` to describe how data is stored and retrieved, and
`templates` to describe the appearance of the data when displayed
to the end user. Also included are the mappings from the URLs type
into a web browser, and the view which retrieves it (`urls.py`)
and `forms.py` among other tidbits. `apps/` is typically where
developers will spend most of their playtime, and, will probably
map pretty well to the tutorials you're using.
This is not an exhaustive list of all the bits (or bytes) and
pieces. It is meant to highlight the most important ones.
......@@ -7,6 +7,8 @@ WORKDIR /code
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY ./libreorganize/ .
RUN python manage.py migrate
RUN python manage.py loaddata core/fixtures/initial_data.json
# Note - this does not scale beyond one image, it runs in _every image_
# COPY crontab /etc/cron.d/libreorganize
......
> **LibreOrganize - Association Management System (AMS)**
> **Copyright (C) 2020 Stefan-Ionut Barbu**
> **Copyright (C) 2020 NOVA Web Development, LLC**
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
......
......@@ -6,10 +6,10 @@ release | [![Pipeline Status](https://gitlab.com/libreorganize/libreorganize/bad
master | [![Pipeline Status](https://gitlab.com/libreorganize/libreorganize/badges/master/pipeline.svg)](https://gitlab.com/libreorganize/libreorganize/-/commits/master) | [![Coverage Report](https://gitlab.com/libreorganize/libreorganize/badges/master/coverage.svg)](https://gitlab.com/libreorganize/libreorganize/-/commits/master)
# About
- LibreOrganize is a web platform for local unions and progressive organizations.
- We are helping build popular power through democratic control of our data.
# Installation
## LibreOrganize
......@@ -43,7 +43,7 @@ You should now have a development version of the `libreorganize` accessible at `
1. Change the directory to `libreorganize` using `$ cd libreorganize/`.
2. Clone the theme repository using `$ git clone git@gitlab.com:libreorganize/libreorganize-themes.git theme/`.
2. Clone the theme repository using `$ git clone git@gitlab.com:libreorganize/libreorganize-custom-themes.git theme/`.
3. Edit the file `settings.py` and apply your custom settings.
......@@ -199,3 +199,22 @@ There are 2 easy solutions you can follow:
- Output the email content to the `Terminal` by changing the `EMAIL_BACKEND` variable in the settings to the following:
`EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`.
### Docker Support
In order to get a docker container of LibreOrganize you need the following commands...
```
docker build --tag libreorganize:latest .
docker run --publish 8000:8000 -it libreorganize python /code/manage.py runserver 0.0.0.0:8000
```
### Cron job
Some apps such as *memberships* may require a cron job that runs behind the scenes to keep things updated. If you plan on using the memberships app please follow the following steps.
```
$ crontab -e
m h dom mon dow command
0 0 * * * cd /srv/libreorganize/libreorganize/ ../venv/bin/python manage.py update_membership_status
```
# $ crontab -e
# m h dom mon dow command
0 0 * * * cd /srv/libreorganize/libreorganize/ ../venv/bin/python manage.py update_membership_status
\ No newline at end of file
......@@ -8,7 +8,7 @@ services:
- POSTGRES_USER=libreorganize
- POSTGRES_PASSWORD=libreorganize
web:
image: registry.gitlab.com/funwhilelost/libreorganize:latest
image: registry.gitlab.com/libreorganize/libreorganize:latest
command: python /code/manage.py runserver 0.0.0.0:8000
environment: &djangoEnvironment
- ALLOWED_HOSTS=0.0.0.0,localhost
......@@ -23,11 +23,11 @@ services:
- LO_DB_HOST=db
- LO_DB_PORT=5432
ports:
- 8040:8000
- 8000:8000
depends_on:
- db
cron:
image: registry.gitlab.com/funwhilelost/libreorganize:latest
image: registry.gitlab.com/libreorganize/libreorganize:latest
command: cron -f
environment: *djangoEnvironment
depends_on:
......
......@@ -6,5 +6,6 @@ LO_EMAIL_HOST_PASSWORD=""
LO_DB_NAME="libreorganize"
LO_DB_USER="libreorganize"
LO_DB_PASSWORD="libreorganize"
LO_DOMAIN=""
LO_GOOGLE_OAUTH2_KEY="Google OAth Cliend ID"
LO_GOOGLE_OAUTH2_SECRET="Google OAth Cliend Secret"
\ No newline at end of file
......@@ -297,6 +297,7 @@ class EditForm(forms.ModelForm):
"zipcode",
"country",
"avatar",
"notification",
)
labels = {
"first_name": "First Name",
......@@ -307,6 +308,7 @@ class EditForm(forms.ModelForm):
"address2": "Address Line 2",
"state": "State / Region / Province",
"zipcode": "ZIP / Postal Code",
"notification": "Event Notification",
}
def __init__(self, *args, **kwargs):
......
......@@ -7,356 +7,413 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-03 17:09-0400\n"
"POT-Creation-Date: 2020-08-16 14:32-0400\n"
"PO-Revision-Date: 2020-04-06 23:56-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.3\n"
#: apps/accounts/forms.py:22 apps/accounts/forms.py:139
#: apps/accounts/templates/accounts/detail.html:56
#: apps/accounts/templates/accounts/list.html:21
#: apps/accounts/forms.py:23 apps/accounts/forms.py:181
#: apps/accounts/templates/accounts/account_detail.html:65
#: apps/accounts/templates/accounts/account_list.html:20
msgid "Email"
msgstr "Correo Electrónico"
#: apps/accounts/forms.py:23 apps/accounts/forms.py:52
#: apps/accounts/forms.py:24 apps/accounts/forms.py:94
msgid "Password"
msgstr "Contraseña"
#: apps/accounts/forms.py:34
#: apps/accounts/forms.py:35
msgid "Your account has not been activated."
msgstr "Su cuenta no ha sido activada."
#: apps/accounts/forms.py:39
#: apps/accounts/forms.py:40
msgid "The email and/or password you entered are incorrect."
msgstr "El correo electrónico y/o contraseña que ingreso son incorrectos."
#: apps/accounts/forms.py:50 apps/accounts/forms.py:216
#: apps/accounts/forms.py:92
msgid "Verify Email"
msgstr "Verifique Correo Electronico"
#: apps/accounts/forms.py:54
#: apps/accounts/forms.py:96
msgid "Must have at least 8 characters, a letter, and a number"
msgstr "Debe tener al menos 8 caracteres, una letra y un número"
#: apps/accounts/forms.py:56
#: apps/accounts/forms.py:98
msgid "Verify Password"
msgstr "Verifique contraseña"
#: apps/accounts/forms.py:58
#: apps/accounts/forms.py:100
msgid "I agree to the Terms of Service"
msgstr "Estoy de acuerdo con los Términos y Servicios"
#: apps/accounts/forms.py:103 apps/accounts/forms.py:175 apps/accounts/forms.py:199
msgid "The password needs to have at least 8 characters, a letter, and a number."
#: apps/accounts/forms.py:145 apps/accounts/forms.py:217
#: apps/accounts/forms.py:241
msgid ""
"The password needs to have at least 8 characters, a letter, and a number."
msgstr "Debe tener al menos 8 caracteres, una letra y un número."
#: apps/accounts/forms.py:108 apps/accounts/forms.py:278
#: apps/accounts/forms.py:150 apps/accounts/forms.py:328
msgid "Enter a valid first name."
msgstr "Ingrese un nombre válido."
#: apps/accounts/forms.py:113 apps/accounts/forms.py:283
#: apps/accounts/forms.py:155 apps/accounts/forms.py:333
msgid "Enter a valid last name."
msgstr "Ingrese un apellido válido."
#: apps/accounts/forms.py:118 apps/accounts/forms.py:288
#: apps/accounts/forms.py:160 apps/accounts/forms.py:338
msgid "The date of birth cannot be in the future."
msgstr "La fecha de nacimiento no puede ser en el futuro."
#: apps/accounts/forms.py:126 apps/accounts/forms.py:296
#: apps/accounts/forms.py:168 apps/accounts/forms.py:346
msgid "The emails do not match."
msgstr "Los correos electrónicos no coinciden."
#: apps/accounts/forms.py:128 apps/accounts/forms.py:182 apps/accounts/forms.py:206
#: apps/accounts/forms.py:170 apps/accounts/forms.py:224
#: apps/accounts/forms.py:248
msgid "The passwords do not match."
msgstr "Las contraseñas no coinciden."
#: apps/accounts/forms.py:145
#: apps/accounts/forms.py:187
msgid "The email is not associated with any active accounts."
msgstr "El correo electrónico no está asociado con ninguna cuenta activa."
#: apps/accounts/forms.py:154
#: apps/accounts/forms.py:196
msgid "You requested a password reset."
msgstr "Solicitó un restablecimiento de contraseña."
#: apps/accounts/forms.py:159
#: apps/accounts/forms.py:201
#, python-format
msgid "Reset Password | %s"
msgstr "Restablecer contraseña | %s"
#: apps/accounts/forms.py:168 apps/accounts/forms.py:192
#: apps/accounts/forms.py:210 apps/accounts/forms.py:234
msgid "New Password"
msgstr "Nueva Contraseña"
#: apps/accounts/forms.py:170 apps/accounts/forms.py:194
#: apps/accounts/forms.py:212 apps/accounts/forms.py:236
msgid "Verify New Password"
msgstr "Verifique nueva contraseña"
#: apps/accounts/forms.py:218 apps/accounts/templates/accounts/detail.html:60
#: apps/accounts/forms.py:260
#: apps/accounts/templates/accounts/account_detail.html:69
#: apps/accounts/templates/accounts/account_list.html:21
msgid "Phone Number"
msgstr "Número de Teléfono"
#: apps/accounts/forms.py:222
#: apps/accounts/forms.py:264
msgid "Must have only digits and an optional country code"
msgstr "Debe tener solo dígitos y un código de país opcional"
#: apps/accounts/forms.py:301 apps/accounts/templates/accounts/detail.html:108
#: apps/accounts/forms.py:351
#: apps/accounts/templates/accounts/account_detail.html:121
msgid "Superuser"
msgstr "Superusuario"
#: apps/accounts/forms.py:301
#: apps/accounts/forms.py:351
msgid "Superusers have all permissions"
msgstr "Los superusuarios tienen todos los permisos"
#: apps/accounts/forms.py:302
#: apps/accounts/forms.py:352
msgid "Permissions"
msgstr "Permisos"
#: apps/accounts/models.py:13
#: apps/accounts/models.py:14
msgid "This email is already in use."
msgstr "El correo electrónico ya está en uso."
#: apps/accounts/models.py:18
#: apps/accounts/models.py:19
msgid "Must be formatted as YYYY-MM-DD"
msgstr "Debe estar formateado como AAAA-MM-DD"
#: apps/accounts/models.py:21
msgid "Must not have any spaces, paranthesis, or dashes"
#: apps/accounts/models.py:22
#, fuzzy
#| msgid "Must not have any spaces, paranthesis, or dashes"
msgid "Must not have any spaces, parentheses, or dashes"
msgstr "No debe tener espacios, paréntesis ni guiones"
#: apps/accounts/models.py:22
#: apps/accounts/models.py:23
msgid "Street address, P.O. box"
msgstr "Dirección, P.O. caja"
#: apps/accounts/models.py:23
#: apps/accounts/models.py:24
msgid "Apartment, suite, unit, building, floor"
msgstr "Apartamento, habitación, unidad, edificio, piso"
#: apps/accounts/models.py:29
#: apps/accounts/models.py:32
msgid "Use a 1:1 image for the best quality"
msgstr "Utilice una imagen 1:1 para la mejor calidad"
#: apps/accounts/templates/accounts/delete.html:5
#: apps/accounts/templates/accounts/detail.html:33
#: apps/accounts/templates/accounts/account_confirm_delete.html:4
#: apps/accounts/templates/accounts/account_confirm_delete.html:11
#: apps/accounts/templates/accounts/account_detail.html:41
msgid "Delete Account"
msgstr "Eliminar Cuenta"
#: apps/accounts/templates/accounts/delete.html:12
msgid "DELETE ACCOUNT"
msgstr "ELIMINAR CUENTA"
#: apps/accounts/templates/accounts/delete.html:18
#: apps/accounts/templates/accounts/account_confirm_delete.html:17
msgid "Are you sure you want to delete this account?"
msgstr "¿Estás seguro de que quieres eliminar esta cuenta?"
#: apps/accounts/templates/accounts/delete.html:20
#: apps/accounts/templates/accounts/account_confirm_delete.html:19
msgid "This action is irreversible."
msgstr "Esta acción es irreversible."
#: apps/accounts/templates/accounts/delete.html:23
#: apps/accounts/templates/accounts/account_confirm_delete.html:22
msgid "Delete"
msgstr "Eliminar"
#: apps/accounts/templates/accounts/detail.html:25
#: apps/accounts/templates/accounts/account_create.html:5
msgid "Create"
msgstr "Crear"
#: apps/accounts/templates/accounts/account_create.html:20
#, fuzzy
#| msgid "Delete Account"
msgid "Create Account"
msgstr "Eliminar Cuenta"
#: apps/accounts/templates/accounts/account_create.html:27
#: apps/accounts/templates/accounts/account_form.html:27
#: apps/accounts/templates/accounts/password/change.html:19
#: apps/accounts/templates/accounts/password/reset.html:19
#: apps/accounts/templates/accounts/permissions/edit.html:19
#: apps/accounts/templates/accounts/register.html:27
msgid "Submit"
msgstr "Enviar"
#: apps/accounts/templates/accounts/account_detail.html:24
msgid "View Membership"
msgstr "Ver Membresía"
#: apps/accounts/templates/accounts/detail.html:28
#: apps/accounts/templates/accounts/password/change.html:5
msgid "Change Password"
msgstr "Cambiar Contraseña"
#: apps/accounts/templates/accounts/account_detail.html:27
msgid "View Attendance History"
msgstr "Ver Historial de Asistencia"
#: apps/accounts/templates/accounts/detail.html:30
#: apps/accounts/templates/accounts/permissions/edit.html:6
#: apps/accounts/templates/accounts/account_detail.html:31
#: apps/accounts/templates/accounts/permissions/edit.html:5
#: apps/accounts/templates/accounts/permissions/edit.html:12
msgid "Edit Permissions"
msgstr "Editar Permisos"
#: apps/accounts/templates/accounts/detail.html:32
#: apps/accounts/templates/accounts/edit.html:5
#: apps/accounts/templates/accounts/account_detail.html:35
#: apps/accounts/templates/accounts/account_form.html:5
#: apps/accounts/templates/accounts/account_form.html:20
msgid "Edit Account"
msgstr "Editar Cuenta"
#: apps/accounts/templates/accounts/detail.html:44
#: apps/accounts/templates/accounts/account_detail.html:38
#: apps/accounts/templates/accounts/password/change.html:5
#: apps/accounts/templates/accounts/password/change.html:12
msgid "Change Password"
msgstr "Cambiar Contraseña"
#: apps/accounts/templates/accounts/account_detail.html:53
#: apps/accounts/templates/accounts/attendance/list.html:19
msgid "Title"
msgstr "Título"
#: apps/accounts/templates/accounts/detail.html:48
#: apps/accounts/templates/accounts/list.html:19
#: apps/accounts/templates/accounts/account_detail.html:57
#: apps/accounts/templates/accounts/account_list.html:18
msgid "First Name"
msgstr "Primer Nombre"
#: apps/accounts/templates/accounts/detail.html:52
#: apps/accounts/templates/accounts/list.html:20
#: apps/accounts/templates/accounts/account_detail.html:61
#: apps/accounts/templates/accounts/account_list.html:19
msgid "Last Name"
msgstr "Apellido"
#: apps/accounts/templates/accounts/detail.html:64
#: apps/accounts/templates/accounts/account_detail.html:73
msgid "Date of Birth"
msgstr "Fecha de nacimiento"
#: apps/accounts/templates/accounts/detail.html:68
#: apps/accounts/templates/accounts/account_detail.html:77
msgid "Gender"
msgstr "Género"
#: apps/accounts/templates/accounts/detail.html:72
#: apps/accounts/templates/accounts/account_detail.html:81
msgid "Company / School / University"
msgstr "Compañía/ Escuela / Universidad"
#: apps/accounts/templates/accounts/detail.html:76
#: apps/accounts/templates/accounts/account_detail.html:85
msgid "Address Line 1"
msgstr "Dirección Línea 2"
#: apps/accounts/templates/accounts/detail.html:80
#: apps/accounts/templates/accounts/account_detail.html:89
msgid "Address Line 2"
msgstr "Dirección Línea 2"
#: apps/accounts/templates/accounts/detail.html:84
#: apps/accounts/templates/accounts/account_detail.html:93
msgid "City"
msgstr "Ciudad"
#: apps/accounts/templates/accounts/detail.html:88
#: apps/accounts/templates/accounts/account_detail.html:97
msgid "State / Region / Province"
msgstr "Estado / Región / Provincia"
#: apps/accounts/templates/accounts/detail.html:92
#: apps/accounts/templates/accounts/account_detail.html:101
msgid "ZIP / Postal Code"
msgstr "ZIP / Código Postal"
#: apps/accounts/templates/accounts/detail.html:96
#: apps/accounts/templates/accounts/account_detail.html:105
msgid "Country"
msgstr "País"
#: apps/accounts/templates/accounts/detail.html:100
#: apps/accounts/templates/accounts/account_detail.html:109
msgid "Event Notification"
msgstr "Notificación de Eventos"
#: apps/accounts/templates/accounts/account_detail.html:113
msgid "Last Login"
msgstr "Ultimo Inicio de Sesión"
#: apps/accounts/templates/accounts/detail.html:104
#: apps/accounts/templates/accounts/account_detail.html:117
msgid "Active"
msgstr "Activo"
#: apps/accounts/templates/accounts/edit.html:20
msgid "EDIT ACCOUNT"
msgstr "EDITAR CUENTA"
#: apps/accounts/templates/accounts/edit.html:27
#: apps/accounts/templates/accounts/password/change.html:19
#: apps/accounts/templates/accounts/password/reset.html:19
#: apps/accounts/templates/accounts/permissions/edit.html:23
#: apps/accounts/templates/accounts/register.html:27
msgid "Submit"
msgstr "Enviar"
#: apps/accounts/templates/accounts/list.html:4
#: apps/accounts/templates/accounts/account_list.html:4
#: apps/accounts/templates/accounts/account_list.html:11
msgid "Accounts"
msgstr "Cuentas"
#: apps/accounts/templates/accounts/list.html:11
msgid "ACCOUNTS"
msgstr "CUENTAS"
#: apps/accounts/templates/accounts/account_list.html:22
msgid "# Events"
msgstr "# Eventos"
#: apps/accounts/templates/accounts/login.html:5
msgid "Login"
msgstr "Iniciar Sesión"
#: apps/accounts/templates/accounts/attendance/list.html:4
#: apps/accounts/templates/accounts/attendance/list.html:11
msgid "Attendance History"
msgstr "Historial de Asistencia"
#: apps/accounts/templates/accounts/login.html:12
msgid "LOG IN"
msgstr "INICIAR SESIÓN"
#: apps/accounts/templates/accounts/attendance/list.html:20
msgid "Date"
msgstr "Fecha"
#: apps/accounts/templates/accounts/login.html:5
#: apps/accounts/templates/accounts/login.html:12
#: apps/accounts/templates/accounts/login.html:19
msgid "Log in"
msgstr "Iniciar sesión"
#: apps/accounts/templates/accounts/login.html:20
#: apps/accounts/templates/accounts/register.html:5
#: apps/accounts/templates/accounts/register.html:20
msgid "Register"
msgstr "Registrarse"
#: apps/accounts/templates/accounts/login.html:25
#: apps/accounts/templates/accounts/login.html:32