Merged all email files into one to make it easier to manage. Changed code accordingly
[flowspy] / settings.py.dist
index 6a8f6d0..76f18d3 100644 (file)
@@ -1,29 +1,33 @@
 # Django settings for flowspy project.
 
-DEBUG = True
+import os
+import djcelery
+djcelery.setup_loader()
+from celery.schedules import crontab
+DEBUG = False
 TEMPLATE_DEBUG = DEBUG
 
 ADMINS = (
-    # ('Your Name', 'your_email@domain.com'),
+    ('AdminName', 'adminmail@admin.com'),
 )
 
-import djcelery
-djcelery.setup_loader()
+here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
+
 
 
 MANAGERS = ADMINS
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': '',                      # Or path to database file if using sqlite3.
+        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+        'NAME': 'flowspec',                      # Or path to database file if using sqlite3.
         'USER': '',                      # Not used with sqlite3.
         'PASSWORD': '',                  # Not used with sqlite3.
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
         'OPTIONS':  {
-        "init_command": "SET storage_engine=INNODB",
-}
+        "init_command": "SET storage_engine=MYISAM",
+        }
     }
 }
 
@@ -99,6 +103,7 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.cache.FetchFromCacheMiddleware',
+    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
 )
 
 AUTHENTICATION_BACKENDS = (
@@ -108,10 +113,10 @@ AUTHENTICATION_BACKENDS = (
 
 ROOT_URLCONF = 'flowspy.urls'
 
-STATIC_URL = '/home/leopoul/projects/flowspy/static'
+STATIC_URL = '/path/to/static'
 
 TEMPLATE_DIRS = (
-    '/home/leopoul/projects/flowspy/templates/',
+    '/path/to/templates/',
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
@@ -124,9 +129,10 @@ INSTALLED_APPS = (
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
+    'django.contrib.flatpages',
     'flowspec',
     'poller',
-#    'south',
+    'south',
     # Uncomment the next line to enable the admin:
     'django.contrib.admin',
     # Uncomment the next line to enable admin documentation:
@@ -134,12 +140,13 @@ INSTALLED_APPS = (
     'django_extensions',
     'djcelery',
     'peers',
+       'registration',
     'accounts'
 )
 
 LOGIN_URL = '/fod/welcome'
 
-CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=600"
+CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=3600"
 
 AUTH_PROFILE_MODULE = 'accounts.UserProfile'
 
@@ -157,28 +164,50 @@ USE_X_FORWARDED_HOST = True
 BROKER_HOST = "localhost"
 BROKER_PORT = 11300
 POLLS_TUBE = 'polls'
+
 BROKER_VHOST = "/"
 CELERY_CONCURRENCY = 1
 
 # List of modules to import when celery starts.
 CELERY_IMPORTS = ("flowspec.tasks", )
 
-SERVER_EMAIL = "noreply@grnet.gr"
-EMAIL_SUBJECT_PREFIX = "[fod] "
+SERVER_EMAIL = "GRNET FoD Service <noreply@grnet.gr>"
+EMAIL_SUBJECT_PREFIX = "[FoD] "
+
+LOG_FILE_LOCATION = here("log")
+
+EXPIRATION_NOTIFY_DAYS = 4
+PREFIX_LENGTH = 29 
+POLL_SESSION_UPDATE = 60.0
 
 BROKER_URL = "beanstalk://localhost:11300//"
 
-SHIB_AUTH_AFFILIATION = 'urn:mace:grnet.gr:pki:user'
+SHIB_AUTH_ENTITLEMENT = 'urn:mace'
 SHIB_ADMIN_DOMAIN = 'grnet.gr'
-SHIB_LOGOUT_URL = 'https://netdev.grnet.gr/Shibboleth.sso/Logout'
+SHIB_LOGOUT_URL = 'https://example.com/Shibboleth.sso/Logout'
 
-from celery.schedules import crontab
+# BCC mail addresses
+NOTIFY_ADMIN_MAILS = ["admin@admin.com"]
+
+UI_USER_THEN_ACTIONS = ['discard', 'rate-limit']
+UI_USER_PROTOCOLS = ['icmp', 'tcp', 'udp']
 
-CELERYBEAT_SCHEDULE = {
-    # Executes every day at 01:35 AM 
+PROTECTED_SUBNETS = ['10.10.0.0/16']
+
+CELERYBEAT_SCHEDULE = { 
     "every-day-sync": {
         "task": "flowspec.tasks.check_sync",
-        "schedule": crontab(minute=35, hour=01),
+        "schedule": crontab(minute=01, hour=01),
+        "args": (),
+    },
+    "notify-expired": {
+        "task": "flowspec.tasks.notify_expired",
+        "schedule": crontab(minute=01, hour=02),
         "args": (),
     },
 }
+# whois
+PRIMARY_WHOIS = 'whois.grnet.gr'
+ALTERNATE_WHOIS = 'whois.ripe.net'
+
+ACCOUNT_ACTIVATION_DAYS = 7
\ No newline at end of file