|
Installation
Installation of openpolitics
IntroductionOpenpolitics is a set of reusable django apps that can be deployed in any django project. DependenciesOpenpolitics depends on Django 1.2 Promise check depends on django-registration DetailsBelow I will describe an example setup, but you can use any of the common django approaches. Lay out directory structure:
In a simplest case, in order to run plain openpolitics app, it looks like this:
You should replace the last one with your project, but you can look at http://hg.braniecki.net/gov20pl to see an example of a project that uses openpolitics. Make sure your project uses proper django installation (hint: in manage.py add path to source/django to sys.path on the first position) StepsOnce you have everything downloaded, you can proceed to deployment. Enter your project dir, add openpolitics, openpolitics.browser and openpolitics.feedreader to INSTALLED_APPS and:
If you're working on a project for another country, you don't need anything except of legislature dataset and even this one you can plan as you like. All structures are used to describe relations between institutions and people. Once you have this, and you have some templates to match views you have to plan your urls. You can look at gov20pl example if you just wish to copy url patterns from application. Loading data from sourcesIn order to load data from two sources we have so far you have to launch python manage.py cron (later, you may want to put it to cron once we have it working better ;)) This will load the data from two sources and link them together. That's all for now. It should work |
I think it's worth to mention steps needed to run gov20pl example: