Skip to content

Commit d3be13d

Browse files
committed
Merge pull request #41 from colab-community/rm-interlegis-refs
Remove interlegis references. Closes #36
2 parents 0fbfa5b + 436a931 commit d3be13d

19 files changed

Lines changed: 140 additions & 119 deletions

File tree

puppet/hieradata/common.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@ nginx::worker_processes: 8
1414
nginx::error_log: '/var/log/nginx/error.log'
1515
nginx::access_log: '/var/log/nginx/access.log'
1616

17-
colab::mailman_archive_path: '/mnt/mailman/archives/'
17+
colab::mailman_archive_path: '/var/lib/mailman/archives/public/'
1818
colab::mailman_exclude_lists:
19-
- saberes-divulgacao
20-
- pml
2119
- mailman
22-
- lexml-anuncions
2320
colab::hostnames:
24-
- colab.interlegis.leg.br
25-
- colab.interlegis.gov.br
2621
- localhost
2722
colab::solr_project_path: '/home/colab/solr-4.6.1/colab'

puppet/modules/colab/templates/nginx/extra_conf.erb

Lines changed: 0 additions & 8 deletions
This file was deleted.

puppet/modules/colab/templates/nginx/site_default.erb

Lines changed: 0 additions & 58 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ diazo==1.0.5
4747

4848
# Dpaste
4949
# TODO: Pull-request to mainstream repository
50-
git+https://github.com/interlegis/dpaste
50+
-e git+https://github.com/colab-community/dpaste@i18n/pt_BR#egg=dpaste
5151

5252
# Mailman 2 REST API
5353
mailman-api==0.2.1

src/accounts/templates/accounts/user_update_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ <h3 class="panel-title">{% trans "Emails" %}</h3>
185185
<div class="panel panel-default">
186186
<div class="panel-heading">
187187
<h3 class="panel-title">
188-
{% blocktrans %}Change <a href="http://repositorio.interlegis.gov.br/">SVN</a> and <a href="http://mensageiro.interlegis.gov.br/">XMPP Client</a> password{% endblocktrans %}
188+
{% trans 'Change Password' %}
189189
</h3>
190190
</div>
191191
<div class="panel-body">

src/accounts/views.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from haystack.query import SearchQuerySet
2424

2525
from super_archives.models import EmailAddress, Message
26-
from super_archives.utils.email import send_email_lists
2726
from search.utils import trans
2827
#from proxy.trac.models import WikiCollabCount, TicketCollabCount
2928
from .forms import (UserCreationForm, ListsForm, UserUpdateForm,
@@ -141,10 +140,6 @@ def signup(request):
141140

142141
user = user_form.save()
143142

144-
mailing_lists = lists_form.cleaned_data.get('lists')
145-
if mailing_lists:
146-
send_email_lists(user, mailing_lists)
147-
148143
# Check if the user's email have been used previously
149144
# in the mainling lists to link the user to old messages
150145
email_addr, created = EmailAddress.objects.get_or_create(address=user.email)
@@ -154,6 +149,9 @@ def signup(request):
154149
email_addr.user = user
155150
email_addr.save()
156151

152+
mailing_lists = lists_form.cleaned_data.get('lists')
153+
mailman.update_subscription(user.email, mailing_lists)
154+
157155
messages.success(request, _('Your profile has been created!'))
158156
messages.warning(request, _('You must login to validated your profile. '
159157
'Profiles not validated are deleted in 24h.'))

src/colab/custom_settings.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
from settings import *
22
from django.utils.translation import ugettext_lazy as _
33

4+
# Allow Django runserver to serve SVG files
5+
# https://code.djangoproject.com/ticket/20162
6+
import mimetypes
7+
mimetypes.add_type('image/svg+xml', '.svg')
8+
49
DEBUG = False
510

611
TEMPLATE_DEBUG = False
@@ -187,11 +192,6 @@
187192
}
188193
}
189194

190-
COLAB_FROM_ADDRESS = '"Colab Interlegis" <noreply@interlegis.leg.br>'
191-
SERVER_EMAIL = COLAB_FROM_ADDRESS
192-
EMAIL_HOST = 'smtp.interlegis.leg.br'
193-
EMAIL_PORT = 25
194-
195195
TEMPLATE_CONTEXT_PROCESSORS = (
196196
'django.contrib.auth.context_processors.auth',
197197
'django.core.context_processors.debug',
@@ -243,7 +243,7 @@
243243

244244
AUTH_USER_MODEL = 'accounts.User'
245245

246-
ALLOWED_HOSTS = ['colab.interlegis.leg.br']
246+
ALLOWED_HOSTS = []
247247

248248
from django.contrib.messages import constants as messages
249249
MESSAGE_TAGS = {
@@ -286,7 +286,6 @@
286286
# This URL must use SSL in order to keep chat sessions secure
287287
CONVERSEJS_BOSH_SERVICE_URL = SITE_URL + '/http-bind'
288288

289-
CONVERSEJS_AUTO_REGISTER = 'mensageiro.interlegis.gov.br'
290289
CONVERSEJS_ALLOW_CONTACT_REQUESTS = False
291290
CONVERSEJS_SHOW_ONLY_ONLINE_USERS = True
292291

@@ -304,7 +303,7 @@
304303
('never', _(u'Never')),
305304
)
306305
DPASTE_EXPIRE_DEFAULT = DPASTE_EXPIRE_CHOICES[4][0]
307-
DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created on Colab Interlegis'
306+
DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created from Colab DPaste'
308307
DPASTE_DEFAULT_GIST_NAME = 'colab_paste'
309308
DPASTE_LEXER_DEFAULT = 'text'
310309

src/colab/local_settings-prod.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
import os
3+
import json
4+
5+
from custom_settings import *
6+
7+
SECRETS_FILE = '/home/colab/colab/secrets.json'
8+
9+
if os.path.exists(SECRETS_FILE):
10+
secrets = json.load(file(SECRETS_FILE))
11+
12+
DEBUG = False
13+
TEMPLATE_DEBUG = DEBUG
14+
15+
ADMINS = (
16+
('Name Surname', 'email@provider.com'),
17+
)
18+
MANAGERS = ADMINS
19+
20+
COLAB_FROM_ADDRESS = '"Colab" <noreply@domain.com>'
21+
SERVER_EMAIL = COLAB_FROM_ADDRESS
22+
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
23+
EMAIL_HOST = ''
24+
EMAIL_PORT = 25
25+
EMAIL_SUBJECT_PREFIX = ''
26+
27+
# Make this unique, and don't share it with anybody.
28+
SECRET_KEY = secrets.get('SECRET_KEY')
29+
30+
SITE_URL = ''
31+
ALLOWED_HOSTS = []
32+
33+
# XMPP Server
34+
CONVERSEJS_AUTO_REGISTER = ''
35+
36+
DATABASES['default']['PASSWORD'] = secrets.get('COLAB_DB_PWD')
37+
DATABASES['default']['HOST'] = 'localhost'
38+
39+
DATABASES['trac'] = 'trac_colab'
40+
DATABASES['trac']['PASSWORD'] = secrets.get('TRAC_DB_PWD')
41+
DATABASES['trac']['HOST'] = 'localhost'
42+
43+
HAYSTACK_CONNECTIONS['default']['URL'] = 'http://localhost:8983/solr/'
44+
45+
COLAB_TRAC_URL = 'http://localhost:5000/trac/'
46+
COLAB_GITLAB_URL = 'http://localhost:8090/gitlab/'
47+
48+
CONVERSEJS_ENABLED = False
49+
50+
ROBOTS_NOINDEX = False
51+
52+
RAVEN_CONFIG = {
53+
'dsn': secrets.get('RAVEN_DSN', '') + '?timeout=30',
54+
}

src/locale/pt_BR/LC_MESSAGES/django.po

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,6 @@ msgstr "Adicionar outro endereço de e-mail"
273273
msgid "Add"
274274
msgstr "Adicionar"
275275

276-
#: accounts/templates/accounts/user_update_form.html:188
277-
msgid ""
278-
"Change <a href=\"http://repositorio.interlegis.gov.br/\">SVN</a> and <a href="
279-
"\"http://mensageiro.interlegis.gov.br/\">XMPP Client</a> password"
280-
msgstr ""
281-
"Trocar a senha do <a href=\"http://repositorio.interlegis.gov.br/"
282-
"\">Repositório</a> e do <a href=\"http://mensageiro.interlegis.gov.br/"
283-
"\">Mensageiro</a>"
284-
285276
#: accounts/templates/accounts/user_update_form.html:193
286277
msgid ""
287278
"This feature is available only for those who need to change the password for some "
@@ -1095,8 +1086,8 @@ msgid "RSS - Latest Threads"
10951086
msgstr "RSS - Últimas Discussões"
10961087

10971088
#: templates/open-data.html:6
1098-
msgid "OpenData - Communities Interlegis"
1099-
msgstr "OpenData - Comunidades Interlegis"
1089+
msgid "OpenData"
1090+
msgstr "OpenData"
11001091

11011092
#: templates/open-data.html:7
11021093
msgid ""
@@ -1484,9 +1475,6 @@ msgstr ""
14841475
msgid "Paste it"
14851476
msgstr ""
14861477

1487-
#~ msgid "INTERLEGIS COMMUNITIES"
1488-
#~ msgstr "COMUNIDADES INTERLEGIS"
1489-
14901478
#~ msgid "Creative Commons - attribution, non-commercial"
14911479
#~ msgstr "Creative Commons - atribuição e não-comercial"
14921480

src/static/css/screen.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ li hr {
2424
margin-left: 10px;
2525
}
2626

27+
.navbar-brand img {
28+
height: 40px;
29+
}
30+
2731
#user-menu .wrapper {
2832
padding: 3px 10px;
2933
white-space: nowrap;

0 commit comments

Comments
 (0)