GithubHelp home page GithubHelp logo

isabella232 / open_data_catalog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codeforamerica/open_data_catalog

0.0 0.0 0.0 3.33 MB

A Django web application to help cities easily create an open data catalog.

JavaScript 83.99% Python 16.01%

open_data_catalog's Introduction

Open Data Catalog

A Django web application that can be used by cities to easily get an open data catalog up and running.

NOTE: This fork hasn't been touched since mid-2011. Instead, please visit:

https://github.com/azavea/Open-Data-Catalog

Setup Instructions

You should first make sure that you have git installed on your computer, so that you can clone the project.

$ git clone git://github.com/codeforamerica/open_data_catalog.git open_data_catalog
$ cd open_data_catalog

The next step is to make sure that you have both pip and virtualenv installed so you can setup and isolated environment.

$ sudo easy_install pip
$ pip install virtualenv

If you get errors from pip install virtualenv, you might need to run the command as superuser:

$ sudo pip install virtualenv

You can then set up your isolated environment independent of your system's currently installed Python modules.

$ virtualenv --no-site-packages env
$ source env/bin/activate

Next, pip can recursively install all the dependencies needed to get the Open Data Catalog up and running.

$ pip install -r requirements.txt

Running the Open Data Catalog in development is then pretty simple:

$ python manage.py schemamigration data_catalog --init
$ python manage.py syncdb
$ python manage.py migrate data_catalog

You can then start up the development server.

$ python manage.py runserver

You should then be able to use your web browser to pull up the application on http://localhost:8000.

If you're looking to change the Open Data Catalog to use your city with the provided templates, then you simply need to edit the data_catalog/settings_city file. By replacing the CITY_NAME and CATALOG_URL variables, you can easily change the default locale of Boston to your specific location (for instance, the code below changes it to Tulsa).

CITY_NAME = 'Tulsa'
CATALOG_URL = 'opendatatulsa.org'

Creating the Search Index

In order to use Haystack for search, you'll need to run the following commands from the command line:

$ mkdir whoosh
$ python manage.py rebuild_index

This should create a new search index for your local catalog -- that way you can search for projects, apps, etc.

Restarting the Server

If you've closed your terminal -- and therefore killed the running server -- here's a quick couple steps to get back up running.

Make sure you cd into the open_data_catalog directory.

$ cd path/to/open_data_catalog

Now, we need to source our virtual environment again.

$ source env/bin/activate

And then we can run the server once again.

$ python manage.py runserver

Adding to the Models

If you need to add or take away from the models that you've already synced with your database (currently test.db) -- then you need to run the following commands to migrate the changes.

$ python manage.py schemamigration data_catalog --auto
$ python manage.py migrate data_catalog

Uploading to DotCloud

If you've already signed up for an account on DotCloud and installed the CLI -- pip install dotcloud -- then deploying your Open Data Catalog is pretty straightforward.

$ dotcloud create opendata
$ dotcloud push opendata .

You'll then need to make sure your database is synced properly.

$ dotcloud run opendata.www python current/manage.py syncdb
$ dotcloud run opendata.www python current/manage.py migrate

You should then be able to visit the URL returned from the previous dotcloud push command and see the Open Data Catalog running in development mode on DotCloud's servers.

open_data_catalog's People

Contributors

zachwill avatar kmacedo avatar jimcraner avatar ryanatwork avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.