Skip to main content

A django-based interface for warehousing HCUP data

Project description

=====
HCUP Hachoir: Core module
=====

Part of the Django-HCUP Hachoir set of Python packages. Provides core functionality, including automated detection and configuration of other installed djhcup components.

Quick start
-----------

0. HCUP Hachoir uses Celery (http://www.celeryproject.org/) as a tasking layer by default. Be sure you have properly configured your Django installation to use Celery, including a message broker and result backend. Typically this invovles creating a celery.py file as described in http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html, and adding configuration items to your settings.py file.

For example, with a local rabbitmq-server back-end, add these lines::

BROKER_URL = 'amqp://'
CELERY_RESULT_BACKEND = 'amqp://'

1. Add "djhcup_core" to your INSTALLED_APPS setting like this::

INSTALLED_APPS = (
...
'djhcup_core',
)

2. Modify your urls.py to include the following pattern entry::

url(r'', include('djhcup_core.urls'))

If you want all djhcup addresses to appear as a subdirectory instead, such as www.example.com/your_prefix/, change r'' to r'your_prefix'::

url(r'your_prefix', include('djhcup_core.urls'))

3. Modify your settings.py to include a separate database dictionary entry for djhcup named 'djhcup'. For example::

'djhcup': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'your_db_name',
'USER': 'your_db_user',
'PASSWORD': 'your_db_password',
'HOST': 'your_db_host',
'PORT': '5432',
},

Note that while this could use the same database and credentials as your default entry, we recommend you set it up in a separate database for easier management.

4. Tell djhcup where to look for your HCUP data by adding these lines to your settings.py::

import os, pyhcup
# Look in here for data and loadfiles
DJHCUP_IMPORT_PATHS = [
'/path/to/your/hcup/data/', # update this to point at your raw data
os.path.dirname(pyhcup.__file__), # loadfiles included with PyHCUP
]

5. Run `python manage.py syncdb` to create the djhcup_staging models. Or, if using South, migrate forward to build database objects for this package's models.

6. Start your server per normal (for test servers, use `python manage.py runserver`).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djhcup_core-0.20140801.0dev.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file djhcup_core-0.20140801.0dev.tar.gz.

File metadata

File hashes

Hashes for djhcup_core-0.20140801.0dev.tar.gz
Algorithm Hash digest
SHA256 f7cb0ca6865aa778bb533ef59ad6182713a4b0b37771d5469bae4aed9f1dfe6f
MD5 d2c751b76a413c1b7f284475f73bc0df
BLAKE2b-256 c5a30b14b8b6f11f763bd6da84c434beb1065793a9163cabc462077e1fc8726f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page