Skip to content

Commit

Permalink
Initial commit of project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dorey committed Oct 27, 2010
0 parents commit 982b17e
Show file tree
Hide file tree
Showing 10 changed files with 303 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
django_eav
nmis_analysis
odk_dropbox

tmp/*
*.pyc
Empty file added __init__.py
Empty file.
14 changes: 14 additions & 0 deletions base_templates/base.html
@@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NMIS {% block title %}{% endblock %}</title>
<script type="text/javascript" src="/site_media/js/jquery-1.4.3.js"></script>
<link rel="stylesheet" href="/site_media/css/sitewide.css" type="text/css" media="screen" title="Sitewide" charset="utf-8" />
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
22 changes: 22 additions & 0 deletions custom_settings.py
@@ -0,0 +1,22 @@
# EXAMPLE VALUES--
# Change these for your environment

MEDIA_URL = 'http://localhost/site_media/'
MEDIA_ROOT = '/path/to/project/site_media/'

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'tmp/db.sqlite3',
}
}

ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)

# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
TIME_ZONE = 'America/Chicago'

DEBUG = True
TEMPLATE_DEBUG = DEBUG
22 changes: 22 additions & 0 deletions fabfile.py
@@ -0,0 +1,22 @@
from fabric.api import run, settings

def git_clone():
odk_repo = "git@github.com:mvpdev/ODK_Dropbox.git"
nmis_analysis_repo = "git@github.com:mvpdev/NMIS_analysis.git"
django_eav_repo = "git@github.com:mvpdev/django-eav.git"

run("git clone %s odk_dropbox" % odk_repo)
run("git clone %s nmis_analysis" % nmis_analysis_repo)
run("git clone %s django_eav" % django_eav_repo)

def git_pull():
"Updates all the repositories"

with('cd odk_dropbox'):
run('git pull origin master')

with('cd nmis_analysis'):
run('git pull origin master')

with('cd django_eav'):
run('git pull origin master')
11 changes: 11 additions & 0 deletions manage.py
@@ -0,0 +1,11 @@
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)

if __name__ == "__main__":
execute_manager(settings)
46 changes: 46 additions & 0 deletions settings.py
@@ -0,0 +1,46 @@
from custom_settings import *

MANAGERS = ADMINS

LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = True
USE_L10N = True

ADMIN_MEDIA_PREFIX = '/media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'f6h^bz8&0+ad@+qsntr)_onhx2(y^^u%$434byw3l^q!*n078v'

TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'nmis.urls'

TEMPLATE_DIRS = (
"%s/base_templates/" % PROJECT_ROOT
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',

'odk_dropbox',
'nmis_analysis',
'django_eav',

'django.contrib.admin',
)
1 change: 1 addition & 0 deletions site_media/css/sitewide.css
@@ -0,0 +1 @@
body { font-family: Arial; color: #333; }
166 changes: 166 additions & 0 deletions site_media/js/jquery-1.4.3.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions urls.py
@@ -0,0 +1,15 @@
from django.conf.urls.defaults import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^storage/?', include('nmis.django_eav.urls')),
(r'^analysis/?', include('nmis.nmis_analysis.urls')),

(r'^dropbox/?', include('nmis.odk_dropbox.urls')),
(r'^submission/?', include('nmis.odk_dropbox.urls')),
(r'^formList/?', include('nmis.odk_dropbox.urls')),

(r'^admin/', include(admin.site.urls)),
)

0 comments on commit 982b17e

Please sign in to comment.