Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
* Shift cancellation/deletion email notifications: assigned users will be notified, when shifts are deleted.
* i18n
* new admin theme
* code cleanup
  • Loading branch information
christophmeissner committed Sep 12, 2015
2 parents d895df1 + 53716c7 commit 62ff25c
Show file tree
Hide file tree
Showing 79 changed files with 929 additions and 254 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ settings/production.py
fabfile.py
manlocal.py
db.sqlite3
.DS_Store
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: python
python: "2.7"
install: "pip install -r requirements/dev.txt"
env: DJANGO_SETTINGS_MODULE=volunteer_planner.settings.local
script: py.test --create-db tests/
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
12. September 2015
------------------
- Add pretty admin theme
- Prevent volunteers from subscribing to shifts if their time is conflicting with already
subscribed-to shifts.
- Add py.test, factory-boy and basic factories.
- Add Travis CI integration for pull requests.
- Add django-extensions for dev, for ./manage.py shell_plus and graphing models.
- Simplify views, remove statistics app, move registration app.
- Subscribe button is hidden when already subscribed to shift.
- Add a basic i18n workflow and mark some strings.
- Email notifications for deleted shifts.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://github.com/volunteer-planner/volunteer_planner/wiki/DevelopmentRules

If you are going to use a local mysql server, additionally install

sudo apt-get libmysqlclient-dev mysql-client mysql-server
sudo apt-get install libmysqlclient-dev mysql-client mysql-server

This will install MySQL server, Python libraries and Git. It will ask you to set a root password [ROOT_PASSWORD] for
the mysql server, if you haven't already set up MySQL in the past. Remember the password.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions common/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
File renamed without changes.
8 changes: 8 additions & 0 deletions common/templatetags/string_filters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import template

register = template.Library()


@register.filter
def split(value, separator=' '):
return value.split(separator)
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions demo_data.json

This file was deleted.

Binary file added locale/de/LC_MESSAGES/django.mo
Binary file not shown.
252 changes: 252 additions & 0 deletions locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-12 21:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \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"

#: notifications/models.py:13
msgid "title"
msgstr "Titel"

#: notifications/models.py:14
msgid "subtitle"
msgstr "Untertitel"

#: notifications/models.py:15
msgid "articletext"
msgstr "Artikeltext"

#: registration/admin.py:23
msgid "Activate users"
msgstr "Benutzer aktivieren"

#: registration/admin.py:43
msgid "Re-send activation emails"
msgstr "Aktivierungsmail erneut versenden"

#: registration/forms.py:34
msgid "Username"
msgstr "Benutzername"

#: registration/forms.py:35
msgid "This value may contain only letters, numbers and @/./+/-/_ characters."
msgstr ""
"Der Wert darf nur Buchstaben, Zahlen und die Zeichen @, ., +, - und _ "
"enthalten"

#: registration/forms.py:37
msgid "E-mail"
msgstr "E-Mail Adresse"

#: registration/forms.py:39
msgid "Password"
msgstr "Passwort"

#: registration/forms.py:41
msgid "Password (again)"
msgstr "Passwort (noch einmal)"

#: registration/forms.py:51
msgid "A user with that username already exists."
msgstr "Es gibt bereits einen Benutzer mit diesem Benutzernamen."

#: registration/forms.py:76
msgid "I have read and agree to the Terms of Service"
msgstr "Ich habe die Nutzungsbedingungen gelesen und stimme ihnen zu"

#: registration/forms.py:77
msgid "You must agree to the terms to register"
msgstr "Sie müssen den Nutzungsbedingungen zustimmen"

#: registration/forms.py:93
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Diese E-Mail Adresse ist bereits registriert. Bitte verwenden Sie eine "
"andere E-Mail Adresse"

#: registration/forms.py:118
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""

#: registration/models.py:210
msgid "user"
msgstr ""

#: registration/models.py:211
msgid "activation key"
msgstr ""

#: registration/templates/activate.html:7
#, python-format
msgid ""
"\n"
"Thanks %(account)s, activation complete!\n"
"You may now <a href='%(auth_login_url)s'>login</a> using the username and "
"password you set at registration.\n"
msgstr ""

#: registration/templates/activate.html:12
msgid ""
"Oops &ndash; it seems that your activation key is invalid. Please check the "
"url again."
msgstr ""

#: registration/templates/login.html:15
msgid "Your username and password didn't match. Please try again."
msgstr ""

#: scheduler/models.py:13
msgid "shift"
msgstr "Schicht"

#: scheduler/models.py:14
msgid "shifts"
msgstr "Schichten"

#: scheduler/models.py:15 scheduler/models.py:79
msgid "helptype"
msgstr "Hilfebereich"

#: scheduler/models.py:15
msgid "helptype_text"
msgstr ""
"Jeder Hilfebereich hat so viele Planelemente wie es Arbeitsschichten geben "
"soll. Dies ist EINE Arbeitsschicht für einen bestimmten Tag"

#: scheduler/models.py:16 scheduler/models.py:114
msgid "location"
msgstr "Ort"

#: scheduler/models.py:17
msgid "time from"
msgstr "Anfangszeit"

#: scheduler/models.py:22
msgid "number of needed volunteers"
msgstr "Anz. benoetigter Freiwillige"

#: scheduler/models.py:26
msgid "assigned volunteers"
msgstr "Reg. Freiwillige"

#: scheduler/models.py:30
msgid "volunteers"
msgstr "Freiwillige"

#: scheduler/models.py:80
msgid "helptypes"
msgstr "Hilfebereiche"

#: scheduler/models.py:94
msgid "timeperiod"
msgstr "Zeitspanne"

#: scheduler/models.py:95
msgid "timeperiods"
msgstr "Zeitspannen"

#: scheduler/models.py:115
msgid "locations"
msgstr "Orte"

#: scheduler/views.py:100
#, python-format
msgid ""
"We can't add you to this shift because you've already agreed to other shifts "
"at the same time: %s"
msgstr ""

#: scheduler/views.py:105
msgid "You were successfully added to this shift."
msgstr ""

#: shiftmailer/models.py:7
msgid "given_name"
msgstr "Vorname"

#: shiftmailer/models.py:8
msgid "name"
msgstr "Nachname"

#: shiftmailer/models.py:9
msgid "position"
msgstr "Position"

#: shiftmailer/models.py:10
msgid "organisation"
msgstr "Organisation"

#: shiftmailer/models.py:11
msgid "email"
msgstr "E-Mail"

#: volunteer_planner/settings/base.py:128
msgid "German"
msgstr "Deutsch"

#: volunteer_planner/settings/base.py:129
msgid "English"
msgstr "Englisch"

#: volunteer_planner/templates/registration/password_change_form.html:10
msgid "Change password"
msgstr ""

#: volunteer_planner/templates/registration/password_reset_complete.html:4
#, python-format
msgid ""
"\n"
"Your password has been reset! You may now <a href=\"%(login_url)s\">log in</"
"a>.\n"
msgstr ""

#: volunteer_planner/templates/registration/password_reset_done.html:6
msgid ""
"We have sent you an email with a link to reset your password.\n"
"Please check your email and click the link to continue."
msgstr ""

#: volunteer_planner/templates/registration/password_reset_email.html:3
#, python-format
msgid ""
"You are receiving this email because you (or someone pretending to be you)\n"
"requested that your password be reset on the %(domain)s site. If you do "
"not\n"
"wish to reset your password, please ignore this message.\n"
"\n"
"To reset your password, please click the following link, or copy and paste "
"it\n"
"into your web browser:"
msgstr ""

#: volunteer_planner/templates/registration/password_reset_email.html:12
#, python-format
msgid ""
"\n"
"Your username, in case you've forgotten: %(username)s\n"
"\n"
"Best regards,\n"
"%(site_name)s Management\n"
msgstr ""

#: volunteer_planner/templates/registration/password_reset_form.html:16
msgid "Passwort zurücksetzen"
msgstr ""
29 changes: 29 additions & 0 deletions notifications/migrations/0003_auto_20150912_2049.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('notifications', '0002_auto_20150823_1658'),
]

operations = [
migrations.AlterField(
model_name='notification',
name='subtitle',
field=models.CharField(max_length=255, null=True, verbose_name='subtitle', blank=True),
),
migrations.AlterField(
model_name='notification',
name='text',
field=models.TextField(max_length=20055, verbose_name='articletext'),
),
migrations.AlterField(
model_name='notification',
name='title',
field=models.CharField(max_length=255, verbose_name='title'),
),
]
10 changes: 7 additions & 3 deletions notifications/models.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

# Create your models here.
from django.template.defaultfilters import slugify


class Notification(models.Model):
"""
News updates/"Aufrufe" from locations. Displayed where relevant.
"""
creation_date = models.DateField(auto_now=True)
title = models.CharField(max_length=255, verbose_name="Titel")
subtitle = models.CharField(max_length=255, verbose_name="Untertitel", null=True, blank=True)
text = models.TextField(max_length=20055, verbose_name="Artikeltext")
title = models.CharField(max_length=255, verbose_name=_("title"))
subtitle = models.CharField(max_length=255, verbose_name=_("subtitle"), null=True, blank=True)
text = models.TextField(max_length=20055, verbose_name=_("articletext"))
slug = models.SlugField(auto_created=True, max_length=255)
location = models.ForeignKey('scheduler.Location')

Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
# Imitate Django's test discovery pattern. py.test's default is test_*.py
python_files=test*.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ traitlets==4.0.0
wsgiref==0.1.2
xlwt==1.0.0
python-memcached==1.57
djangocms-admin-style==0.2.8
4 changes: 4 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
-r _base.txt
django-debug-toolbar==1.3.2
django-extensions==1.5.6
factory-boy==2.5.2
pytest==2.7.2
pytest-django==2.8.0
1 change: 1 addition & 0 deletions scheduler/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
default_app_config = 'scheduler.apps.SchedulerConfig'
11 changes: 11 additions & 0 deletions scheduler/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _


class SchedulerConfig(AppConfig):
name = 'scheduler'
verbose_name = _('Scheduler')

def ready(self):
# Connect signals
from . import signals # noqa
8 changes: 8 additions & 0 deletions scheduler/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import forms
from scheduler.models import Need


class RegisterForNeedForm(forms.Form):
ADD, REMOVE = "add", "remove"
need = forms.ModelChoiceField(queryset=Need.objects)
action = forms.ChoiceField(choices=[(ADD, ADD), (REMOVE, REMOVE)])
Loading

0 comments on commit 62ff25c

Please sign in to comment.