Permalink
Browse files

Initial local commit

  • Loading branch information...
0 parents commit 6f72aaaa538cd8518ad9d86a66ea3b827fa1597a @bepetersn bepetersn committed May 17, 2013
@@ -0,0 +1,5 @@
+.DS_Store
+static/bootstrap
+ccj
+*.pyc
+*.orig
@@ -0,0 +1,2 @@
+# Authors
+Ryan Asher, Cecilia Calabria, David Eads, Jimmie Glover, Forest Gregg, Sheila Miguez, Wilberto Morales, Sabine Ye

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1 @@
+web: python manage.py runserver 0.0.0.0:$PORT --noreload
@@ -0,0 +1,28 @@
+# Cook County Jail inmate tracker
+
+A Django app that tracks the population of Cook County Jail over time
+and summarizes trends.
+
+# Using the API
+
+See the [API guide](https://github.com/sc3/cookcountyjail/wiki/API-guide)
+for accessing the production API service and querying the data.
+
+# Running it locally
+
+The scraper is invoked with a management command:
+
+<pre>./manage.py scrape_inmates</pre>
+
+<code>scrape_inmates</code> also supports a <code>--limit / -l</code>
+flag which limits the number of records created and <code>--search /
+-s</code> flag which overrides the default A-Z search strategy.
+
+# License
+
+Licensed under the GNU General Public License Version 3.
+See LICENSE.md.
+
+# Contributors
+
+See AUTHORS.md for contributors.
No changes.
@@ -0,0 +1,139 @@
+import django
+import os
+import sys
+
+SITE_STATIC_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static')
+SITE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+if not 'CCJ_PRODUCTION' in os.environ:
+ DEBUG = True
+ TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ # ('Your Name', 'your_email@example.com'),
+)
+
+MANAGERS = ADMINS
+
+if 'CCJ_PRODUCTION' in os.environ:
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+ 'NAME': 'cookcountyjail',
+ 'USER': 'cookcountyjail',
+ 'PASSWORD': 'walblgadb;lgall',
+ 'HOST': '127.0.0.1',
+ }
+ }
+else:
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(SITE_DIR,'ccj'),
+ }
+ }
+
+# Time zone
+TIME_ZONE = 'America/Chicago'
+
+# Language
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# Internationalization.
+USE_I18N = False
+
+# Number and date localization.
+USE_L10N = False
+
+# Naive times are good by us
+USE_TZ = False
+
+# Media directory
+MEDIA_ROOT = ''
+
+# Media URL
+MEDIA_URL = ''
+
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/home/media/media.lawrence.com/static/"
+STATIC_ROOT = ''
+
+# URL prefix for static files.
+# Example: "http://media.lawrence.com/static/"
+STATIC_URL = '/static/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (SITE_STATIC_ROOT,)
+
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+)
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'fft_#2hrw3y)z4wf35hio*%e**)#3-kja5p!1lcb+pa!#ha8hc'
+
+# List of callables that know how to import templates from various sources.
+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 = 'cookcountyjail.urls'
+
+# Python dotted path to the WSGI application used by Django's runserver.
+WSGI_APPLICATION = 'cookcountyjail.wsgi.application'
+
+TEMPLATE_DIRS = ()
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'django.contrib.admin',
+ 'countyapi',
+ 'tastypie',
+ 'south',
+)
+
+LOGGING = {
+ 'version': 1,
+ 'disable_existing_loggers': False,
+ 'formatters': {
+ 'simple': {
+ 'format': '%(levelname)s: %(message)s'
+ },
+ },
+ 'handlers': {
+ 'log_to_stdout': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
+ 'formatter': 'simple',
+ },
+ },
+ 'loggers': {
+ 'main': {
+ 'handlers': ['log_to_stdout'],
+ 'level': 'DEBUG',
+ 'propagate': True,
+ }
+ }
+}
+
@@ -0,0 +1,11 @@
+from django.conf.urls import patterns, include, url
+from django.views.generic import RedirectView
+from django.contrib import admin
+
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ url(r'^admin/', include(admin.site.urls)),
+ url(r'^api/', include('countyapi.urls')),
+
+)
@@ -0,0 +1,28 @@
+"""
+WSGI config for cookcountyjail 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
+named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
+this application via the ``WSGI_APPLICATION`` setting.
+
+Usually you will have the standard Django WSGI application here, but it also
+might make sense to replace the whole Django WSGI application with a custom one
+that later delegates to the Django one. For example, you could introduce WSGI
+middleware here, or combine a Django application with an application of another
+framework.
+
+"""
+import os
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cookcountyjail.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
+# setting points here.
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()
+
+# Apply WSGI middleware here.
+# from helloworld.wsgi import HelloWorldApplication
+# application = HelloWorldApplication(application)
No changes.
@@ -0,0 +1,4 @@
+from django.contrib import admin
+from countyapi.models import CountyInmate
+
+admin.site.register(CountyInmate)
Oops, something went wrong.

0 comments on commit 6f72aaa

Please sign in to comment.