Commit 7046acf8 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'feature/change-committees-to-activemembers' into 'master'

Change committees to activemembers



See merge request !63
parents 70b8f357 2647d5cd
......@@ -6,7 +6,7 @@
<h1>{{ committee.name }}
<span class="title-meta clearfix">
<span>
<a class="back" href="{% url 'committees:index' %}" id="collectionButton"></a>
<a class="back" href="{% url 'activemembers:committees' %}" id="collectionButton"></a>
</span>
</span>
</h1>
......
......@@ -4,7 +4,7 @@ from django.db.utils import IntegrityError
from django.test import TestCase
from django.utils import timezone
from committees.models import Committee, CommitteeMembership
from activemembers.models import Committee, CommitteeMembership
from members.models import Member
......
"""
Committees URL Configuration
Activemembers URL Configuration
"""
from django.conf.urls import url
......@@ -7,7 +7,7 @@ from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^details/(?P<committee_id>\d)/$', views.details, name='details'),
url(r'^committees$', views.committees, name='committees'),
url(r'^committees/(?P<committee_id>\d)/$', views.details, name='details'),
url(r'^boards/(?P<id>\d+)?$', views.boards, name='board'),
]
......@@ -3,12 +3,12 @@ from django.shortcuts import render, get_object_or_404
from .models import Committee, CommitteeMembership, Board
def index(request):
def committees(request):
"""Overview of committees"""
committees = Committee.objects.all()
return render(request,
'committees/index.html',
'activemembers/index.html',
{'committees': committees})
......@@ -27,7 +27,7 @@ def details(request, committee_id):
member.committee_since = membership.since
members.append(member) # list comprehension would be more pythonic?
return render(request, 'committees/details.html',
return render(request, 'activemembers/details.html',
{'committee': committee,
'members': members})
......@@ -55,7 +55,7 @@ def boards(request, id=None):
boardmembers[board.pk] = members
return render(request,
'committees/boards.html',
'activemembers/boards.html',
{'boards': boards,
'boardmembers': boardmembers,
'first_board': boards[0]})
......@@ -8,7 +8,7 @@ from django.utils.http import is_safe_url
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from committees.models import Committee
from activemembers.models import Committee
from members.models import Member
from . import models
......
......@@ -13,7 +13,7 @@ class Migration(migrations.Migration):
dependencies = [
('members', '0004_auto_20160805_1435'),
('committees', '0004_auto_20160727_2253'),
('activemembers', '0004_auto_20160727_2253'),
]
operations = [
......@@ -46,7 +46,7 @@ class Migration(migrations.Migration):
('registration_required', models.BooleanField(default=False, verbose_name='registration required')),
('no_registration_message', models.CharField(blank=True, help_text='Default: No registration required', max_length=200, null=True, verbose_name='message when there is no registration')),
('published', models.BooleanField(default=False, verbose_name='published')),
('organiser', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='committees.Committee')),
('organiser', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='activemembers.Committee')),
],
options={
'ordering': ('-start',),
......
......@@ -16,6 +16,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='event',
name='organiser',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='committees.Committee'),
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='activemembers.Committee'),
),
]
......@@ -20,7 +20,7 @@ class Event(models.Model):
end = models.DateTimeField(_("end time"))
organiser = models.ForeignKey(
'committees.Committee',
'activemembers.Committee',
models.SET_NULL,
null=True,
)
......
......@@ -11,7 +11,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('committees', '0004_auto_20160727_2253'),
('activemembers', '0004_auto_20160727_2253'),
('members', '0003_merge_20160727_2333'),
]
......@@ -31,7 +31,7 @@ class Migration(migrations.Migration):
('prefix', models.CharField(max_length=200)),
('archived', models.BooleanField(default=True)),
('moderated', models.BooleanField(default=False)),
('committees', models.ManyToManyField(blank=True, to='committees.Committee')),
('committees', models.ManyToManyField(blank=True, to='activemembers.Committee')),
('members', models.ManyToManyField(blank=True, to='members.Member')),
],
),
......
......@@ -3,7 +3,7 @@ from django.core import validators
from django.utils.translation import ugettext_lazy as _
from members.models import Member
from committees.models import Committee
from activemembers.models import Committee
class MailingList(models.Model):
......
......@@ -4,7 +4,7 @@ from django.http import Http404
from .models import MailingList
from members.models import Member
from committees.models import CommitteeMembership
from activemembers.models import CommitteeMembership
import hashlib
......
......@@ -3,8 +3,8 @@ from django.utils.translation import ugettext_lazy as _
main = [
{'title': _('Home'), 'name': 'index'},
{'title': _('Association'), 'name': '#', 'submenu': [
{'title': _('Board'), 'name': '#'},
{'title': _('Committees'), 'name': 'committees:index'},
{'title': _('Board'), 'name': 'activemembers:board'},
{'title': _('Committees'), 'name': 'activemembers:committees'},
{'title': _('Members'), 'name': 'members:index'},
{'title': _('Documents'), 'name': 'documents:index'},
{'title': _('Merchandise'), 'name': 'merchandise:index'},
......
......@@ -51,7 +51,7 @@ INSTALLED_APPS = [
'thaliawebsite', # include for admin settings
'members',
'documents',
'committees',
'activemembers',
'photos',
'utils',
'mailinglists',
......@@ -129,7 +129,7 @@ AUTH_PASSWORD_VALIDATORS = [
AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.ModelBackend',
'committees.backends.CommitteeBackend',
'activemembers.backends.CommitteeBackend',
]
# Internationalization
......
......@@ -26,7 +26,7 @@ from utils.views import private_thumbnails
import members
from .sitemaps import StaticViewSitemap
from committees.sitemaps import sitemap as committees_sitemap
from activemembers.sitemaps import sitemap as activemembers_sitemap
from members.sitemaps import sitemap as members_sitemap
from documents.sitemaps import sitemap as documents_sitemap
from thabloid.sitemaps import sitemap as thabloid_sitemap
......@@ -35,7 +35,7 @@ from partners.sitemaps import sitemap as partners_sitemap
thalia_sitemap = {
'main-static': StaticViewSitemap,
}
thalia_sitemap.update(committees_sitemap)
thalia_sitemap.update(activemembers_sitemap)
thalia_sitemap.update(members_sitemap)
thalia_sitemap.update(documents_sitemap)
thalia_sitemap.update(thabloid_sitemap)
......@@ -51,7 +51,7 @@ urlpatterns = [
url(r'^newsletters/', include('newsletters.urls',
namespace='newsletters')),
url(r'^association/', include([
url(r'^committees/', include('committees.urls', namespace='committees')),
url(r'^activemembers/', include('activemembers.urls', namespace='activemembers')),
url(r'^merchandise/', include('merchandise.urls', namespace='merchandise')),
url(r'^documents/', include('documents.urls', namespace='documents')),
url(r'^become-a-member/', members.views.become_a_member, name='become-a-member'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment