Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#50 leaner meaner directory structure #51

Merged
merged 6 commits into from
Nov 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ install:
- "pip install coveralls"
before_script:
- mysql -e 'create database cito;'
- python manage.py syncdb --noinput
- python manage.py migrate
- python app/manage.py syncdb --noinput
- python app/manage.py migrate
# command to run tests
script:
- coverage run --source='.' --omit=tests*,fabfile*,*admin*,*urls*,*manage*,*/settings/*,*wsgi*,*/migrations/* manage.py test
- coverage run --source='.' --omit=tests*,fabfile*,*admin*,*urls*,*manage*,*/settings/*,*wsgi*,*/migrations/* app/manage.py test
after_success:
- coveralls
notifications:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion manage.py → app/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cito.settings.production")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.production")

from django.core.management import execute_from_command_line

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 9 additions & 5 deletions cito/settings/base.py → app/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import os
import sys
import logging

try:
from unipath import Path
except ImportError:
Expand Down Expand Up @@ -129,10 +129,10 @@
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'cito.urls'
ROOT_URLCONF = 'settings.urls'

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

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
Expand All @@ -159,12 +159,16 @@
'audit',
)

STATIC_FILES = PROJECT_ROOT.ancestor(1).child('staticfiles')
STATIC_FILES = PROJECT_ROOT.child('staticfiles')

INCIDENT_PARAMS = ['event', 'timestamp']

LOGIN_URL = '/login/'

AWS_CONF = dict()
RABBITMQ_CONF = dict()
POLLER_CONFIG = dict()

try:
from .secret_key import *
except ImportError:
Expand All @@ -174,4 +178,4 @@
try:
from .ldap_auth import *
except ImportError:
print "LDAP settings not found or mis-configured, CitEngine will use internal authentication"
print "LDAP settings not found or mis-configured, CitEngine will use internal authentication"
22 changes: 0 additions & 22 deletions cito/settings/dev.py → app/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
##################################
# AWS::SQS Configuration settings
##################################
AWS_CONF = dict()
AWS_CONF['region'] = 'us-east-1'
AWS_CONF['awskey'] = ''
AWS_CONF['awssecret'] = ''
Expand All @@ -137,7 +136,6 @@
##################################
# RabbitMQ Configuration settings
##################################
RABBITMQ_CONF = dict()
RABBITMQ_CONF['host'] = 'localhost'
RABBITMQ_CONF['port'] = 5672
RABBITMQ_CONF['username'] = 'cito_user'
Expand All @@ -157,7 +155,6 @@
##############################
# Event Poller config
##############################
POLLER_CONFIG = dict()

# Polling interval in seconds
POLLER_CONFIG['interval'] = 5
Expand All @@ -169,22 +166,3 @@
# Leave this to 60 seconds if you don't know what you are doing.
POLLER_CONFIG['visibility'] = 60


########################################
# Dispatcher config
# (will be deprecated in future release
########################################
DISPATCHER_CONFIG = dict()

# Polling interval
DISPATCHER_CONFIG['interval'] = 10

# Job lock expire time
DISPATCHER_CONFIG['lock_expire'] = 30


##############################
# Event Listener config
##############################
EVENT_LISTENER_CONFIG = dict()
EVENT_LISTENER_CONFIG['port'] = 8080
File renamed without changes.
23 changes: 0 additions & 23 deletions cito/settings/production.py → app/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
##################################
# AWS::SQS Configuration settings
##################################
AWS_CONF = dict()
AWS_CONF['region'] = 'us-east-1'
AWS_CONF['awskey'] = ''
AWS_CONF['awssecret'] = ''
Expand All @@ -136,7 +135,6 @@
##################################
# RabbitMQ Configuration settings
##################################
RABBITMQ_CONF = dict()
RABBITMQ_CONF['host'] = 'localhost'
RABBITMQ_CONF['port'] = 5672
RABBITMQ_CONF['username'] = 'cito_user'
Expand All @@ -156,7 +154,6 @@
##############################
# Event Poller config
##############################
POLLER_CONFIG = dict()

# Polling interval in seconds
POLLER_CONFIG['interval'] = 5
Expand All @@ -167,23 +164,3 @@
# How long should the poller hold on the the message before someone else picks it up on
# Leave this to 60 seconds if you don't know what you are doing.
POLLER_CONFIG['visibility'] = 60


########################################
# Dispatcher config
# (will be deprecated in future release
########################################
DISPATCHER_CONFIG = dict()

# Polling interval
DISPATCHER_CONFIG['interval'] = 10

# Job lock expire time
DISPATCHER_CONFIG['lock_expire'] = 30


##############################
# Event Listener config
##############################
EVENT_LISTENER_CONFIG = dict()
EVENT_LISTENER_CONFIG['port'] = 8080
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added app/staticfiles/images/citoengine_white.png
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cito/templates/login.html → app/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<div class="box-content">
<form action="/login/" method="post" class="form-signin">
<a class="brand" href="/"> <img src="/content/images/cito_logo_small.png" /> </a>
<a class="brand" href="/"> <img src="/content/images/citoengine_white.png" /> </a>
{% if state %}
<div class="alert alert-danger">{{ state }}</div>
{% endif %}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/"> <img src="/content/images/cito_logo_small.png" /> </a>
<div style="width: 230px"> <a class="brand" href="/"> <img src="/content/images/citoengine_white.png" /> </a></div>
<div >
<ul class="nav">
<!--*****Drop Down Menu 0 ***** -->
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions tests/__init__.py

This file was deleted.