Skip to content

Commit

Permalink
restructuring of mailx
Browse files Browse the repository at this point in the history
  • Loading branch information
anantb committed Nov 13, 2012
1 parent d1e8c77 commit dd310d7
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions config/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file contains python variables that configure Lamson for email processing.
import sys, os
import logging
sys.path.append('./modules')


# You may add additional parameters such as `username' and `password' if your
Expand All @@ -11,13 +10,13 @@

receiver_config = {'host': '0.0.0.0', 'port': 25}

handlers = ['modules.handler.main']
handlers = ['smtp_handler.main']

router_defaults = {'host': '\*\\.mit\\.edu'}

template_config = {'dir': 'modules', 'module': 'templates'}

# hook django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "browser.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "http_handler.settings")

# the config/boot.py will turn these values into variables set in settings
File renamed without changes.
8 changes: 5 additions & 3 deletions modules/browser/settings.py → http_handler/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'browser.urls'
ROOT_URLCONF = 'http_handler.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'browser.wsgi.application'
WSGI_APPLICATION = 'http_handler.wsgi.application'

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
Expand All @@ -115,8 +115,10 @@
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'http_handler',
'schema',
'browser',
'handler'
'smtp_handler',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions modules/browser/wsgi.py → http_handler/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for browser project.
WSGI config for mailx project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
Expand All @@ -15,7 +15,7 @@
"""
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "browser.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "http_handler.settings")

# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
Expand Down
2 changes: 1 addition & 1 deletion modules/manage.py → manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "browser.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "http_handler.settings")

from django.core.management import execute_from_command_line

Expand Down
File renamed without changes.
File renamed without changes.
Empty file added smtp_handler/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion modules/handler/main.py → smtp_handler/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging, time, base64, email
from lamson.routing import route, stateless
from config.settings import relay
from models import *
from schema.models import *
from email.utils import *
from lamson.mail import MailResponse

Expand Down

0 comments on commit dd310d7

Please sign in to comment.