Install development environment¶
This part of the documentation explains how you can jump to the development of publicos.pt and deploy the website on your computer. To only interact with the database, e.g. to do statistics, you only need to install the API dependencies.
We assume here that you know Python and a minimum of Django.
Dependencies for the website¶
Besides the dependencies of the API, the website uses the following packages:
For crawling websites, we use a Python package to handle HTML elements. To install it, use:
pip install beautifulsoup4
To develop, we use
django-debug-toolbar, an utility to debug Django websites:
pip install django-debug-toolbar
Running the website¶
Once you have the dependencies installed, you can run the website from the root directory using:
python manage.py runserver
and enter in the url
If anything went wrong or you have any question, please drop by our mailing list so we can help you.
We use standard Django unit test cases. To run tests, use:
python manage.py test <package, module, or function>
For instance, for running the test suite of contracts app, run:
python manage.py test contracts.tests