Commit 8ddbf9d3998abd8eb4131a3b73847ca3d946804e
Exists in
master
and in
39 other branches
Merge branch 'master' of github.com:TracyWebTech/colab
Showing
7 changed files
with
9 additions
and
73 deletions
Show diff stats
etc/apache2/sites-available/colab
| ... | ... | @@ -1,48 +0,0 @@ |
| 1 | -<VirtualHost *:80> | |
| 2 | - ServerName colab01a.interlegis.leg.br | |
| 3 | - ServerAlias colab.interlegis.leg.br | |
| 4 | - ServerAlias colab.interlegis.gov.br | |
| 5 | - | |
| 6 | - <Proxy *> | |
| 7 | - Order deny,allow | |
| 8 | - Allow from all | |
| 9 | - </Proxy> | |
| 10 | - | |
| 11 | - RewriteEngine On | |
| 12 | - RewriteRule ^/login(.*) http://colab-backend.interlegis.leg.br/login$1 [P] | |
| 13 | - RewriteRule ^/logout(.*) http://colab-backend.interlegis.leg.br/logout$1 [P] | |
| 14 | - | |
| 15 | - WSGIDaemonProcess colab user=www-data group=www-data threads=25 | |
| 16 | - WSGIProcessGroup colab | |
| 17 | - | |
| 18 | - Alias /static/admin/ /usr/local/django/colab/lib/python2.6/site-packages/django/contrib/admin/media/ | |
| 19 | - <Directory /usr/local/django/colab/lib/python2.6/site-packages/django/contrib/admin/media/> | |
| 20 | - Options -Indexes | |
| 21 | - Order deny,allow | |
| 22 | - Allow from all | |
| 23 | - AllowOverride None | |
| 24 | - </Directory> | |
| 25 | - | |
| 26 | - Alias /static/ /usr/local/django/colab/static/ | |
| 27 | - <Directory /usr/local/django/colab/static/> | |
| 28 | - Options -Indexes | |
| 29 | - Order deny,allow | |
| 30 | - Allow from all | |
| 31 | - AllowOverride None | |
| 32 | - </Directory> | |
| 33 | - | |
| 34 | - WSGIScriptAlias / /usr/local/django/colab/wsgi/colab.wsgi | |
| 35 | - <Directory /usr/local/django/colab/wsgi/> | |
| 36 | - Order deny,allow | |
| 37 | - Allow from all | |
| 38 | - AllowOverride None | |
| 39 | - </Directory> | |
| 40 | - | |
| 41 | - ErrorLog /var/log/apache2/error.log | |
| 42 | - | |
| 43 | - # Possible values include: debug, info, notice, warn, error, crit, | |
| 44 | - # alert, emerg. | |
| 45 | - LogLevel warn | |
| 46 | - | |
| 47 | - CustomLog /var/log/apache2/access.log combined | |
| 48 | -</VirtualHost> |
etc/apache2/wsgi/colab.wsgi
| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | -import site | |
| 2 | -import os | |
| 3 | - | |
| 4 | -cwd_path = os.path.abspath(os.path.dirname(__file__)) | |
| 5 | -virtualenv_path = os.path.join(cwd_path, '../lib/python2.6/site-packages') | |
| 6 | -site.addsitedir(virtualenv_path) | |
| 7 | - | |
| 8 | -from django.core.handlers.wsgi import WSGIHandler | |
| 9 | -os.environ['DJANGO_SETTINGS_MODULE'] = 'colab.settings' | |
| 10 | -application = WSGIHandler() | |
| 11 | - | |
| 12 | - |
etc/autofs/listas
| ... | ... | @@ -1 +0,0 @@ |
| 1 | -archives -fstype=fuse,rw,nodev,users,noatime :sshfs\#root@listas.interlegis.gov.br\:/var/lib/mailman/archives/private |
etc/cron.d/colab_import_emails
| ... | ... | @@ -1,2 +0,0 @@ |
| 1 | -PATH="/usr/local/django/colab/bin" | |
| 2 | -* * * * * root DJANGO_SETTINGS_MODULE="colab.settings" django-admin.py import_emails --archives_path=/usr/local/django/colab/mnt/archives/ --exclude-list=saberes-divulgacao --exclude-list=pml --exclude-list=mailman --exclude-list=lexml-anuncios > /tmp/colab-import-emails-last.log |
etc/cron.d/colab_solr_reindex
| ... | ... | @@ -1,3 +0,0 @@ |
| 1 | -PATH="/usr/bin" | |
| 2 | -*/1 * * * * root wget "http://solr.interlegis.leg.br:8080/solr/dataimport?wt=json&indent=true&command=delta-import" -q -O - >> /tmp/solr-delta-import.log | |
| 3 | -4 6 * * * root wget "http://solr.interlegis.leg.br:8080/solr/dataimport?wt=json&indent=true&command=full-import" -q -O - >> /tmp/solr-full-import.log |
src/colab/custom_settings.py
| ... | ... | @@ -21,7 +21,7 @@ DJANGO_DATE_FORMAT_TO_JS = { |
| 21 | 21 | LANGUAGE_CODE = 'en' |
| 22 | 22 | |
| 23 | 23 | # The absolute path to the folder containing the attachments |
| 24 | -ATTACHMENTS_FOLDER_PATH = '/home/colab/trac/attachments/' | |
| 24 | +ATTACHMENTS_FOLDER_PATH = '/mnt/trac/attachments/' | |
| 25 | 25 | |
| 26 | 26 | # ORDERING_DATA receives the options to order for as it's keys and a dict as |
| 27 | 27 | # value, if you want to order for the last name, you can use something like: |
| ... | ... | @@ -67,7 +67,7 @@ HAYSTACK_CUSTOM_HIGHLIGHTER = 'colab.utils.highlighting.ColabHighlighter' |
| 67 | 67 | HAYSTACK_CONNECTIONS = { |
| 68 | 68 | 'default': { |
| 69 | 69 | 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', |
| 70 | - 'URL': os.environ.get('COLAB_SOLR_URL'), | |
| 70 | + 'URL': os.environ.get('COLAB_SOLR_URL', 'http://localhost:8983/solr'), | |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
| ... | ... | @@ -193,7 +193,9 @@ LOGGING = { |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | COLAB_FROM_ADDRESS = '"Colab Interlegis" <noreply@interlegis.leg.br>' |
| 196 | -SERVER_EMAIL = EMAIL_HOST_USER = COLAB_FROM_ADDRESS | |
| 196 | +SERVER_EMAIL = COLAB_FROM_ADDRESS | |
| 197 | +EMAIL_HOST = 'smtp.interlegis.leg.br' | |
| 198 | +EMAIL_PORT = 25 | |
| 197 | 199 | |
| 198 | 200 | TEMPLATE_CONTEXT_PROCESSORS = ( |
| 199 | 201 | 'django.contrib.auth.context_processors.auth', |
| ... | ... | @@ -268,7 +270,7 @@ MAILMAN_API_URL = 'http://listas.interlegis.gov.br:8000' |
| 268 | 270 | |
| 269 | 271 | ### BrowserID / Persona |
| 270 | 272 | SITE_URL = 'https://colab.interlegis.leg.br' |
| 271 | -BROWSERID_AUDIENCES = [SITE_URL] | |
| 273 | +BROWSERID_AUDIENCES = [SITE_URL, SITE_URL.replace('https', 'http')] | |
| 272 | 274 | |
| 273 | 275 | |
| 274 | 276 | LOGIN_URL = '/' | ... | ... |
src/super_archives/management/commands/import_emails.py
| ... | ... | @@ -135,7 +135,7 @@ class Command(BaseCommand, object): |
| 135 | 135 | subject_slug = slugify(email.subject_clean) |
| 136 | 136 | thread = self.THREAD_CACHE.get(subject_slug, {}).get(mailinglist.id) |
| 137 | 137 | if thread is None: |
| 138 | - thread = Thread.objects.get_or_create( | |
| 138 | + thread = Thread.all_objects.get_or_create( | |
| 139 | 139 | mailinglist=mailinglist, |
| 140 | 140 | subject_token=subject_slug |
| 141 | 141 | )[0] |
| ... | ... | @@ -167,7 +167,7 @@ class Command(BaseCommand, object): |
| 167 | 167 | else: |
| 168 | 168 | # If the message is already at the database don't do anything |
| 169 | 169 | try: |
| 170 | - messages = Message.objects.get( | |
| 170 | + messages = Message.all_objects.get( | |
| 171 | 171 | message_id=msg_id, |
| 172 | 172 | thread__mailinglist=mailinglist |
| 173 | 173 | ) |
| ... | ... | @@ -196,7 +196,7 @@ class Command(BaseCommand, object): |
| 196 | 196 | |
| 197 | 197 | subject = email_msg.get_subject() |
| 198 | 198 | |
| 199 | - email = Message.objects.create( | |
| 199 | + email = Message.all_objects.create( | |
| 200 | 200 | message_id=email_msg.get('Message-ID'), |
| 201 | 201 | from_address=email_addr, |
| 202 | 202 | subject=subject, | ... | ... |