Systers Portal is for Systers communities to post and share information within and with other communities.
Project page: http://systers.github.io/portal/
Setup for developers
- Make sure you have installed Python 3.4 (preferably latest minor release), pip and virtualenv.
- If working behind a proxy, make sure your environment variables are properly set up. If you still get an error due to proxy, use "-E" flag along with "sudo" to export all the environment variables.
- Make sure you have PostgreSQL installed. For a tutorial on installing Postgres, Django Girls' ebook, Tutorials Extension, is a reference. The info is also on Django Girls GitHub repository.
- Make sure you have python3-dev installed -
sudo pip install python3-dev
- Clone the repo -
git clone firstname.lastname@example.org:systers/portal.gitand cd into the
portaldirectory. If working behind a proxy, follow the instructions here.
Create a virtual environment with Python 3 and install dependencies:
$ virtualenv venv --python=/path/to/python3 $ source venv/bin/activate $ pip install -r requirements/dev.txt
systersdbmight be any suitable name.
- Fill in the database details in
export SECRET_KEY=foobarbazin your terminal, ideally the secret key should be 40 characters long, unique and unpredictable. Optionally to set the shell variable every time you activate the virtualenv, edit
venv/bin/activateand add to the bottom the export statement.
python systers_portal/manage.py migrate.
python systers_portal/manage.py createsuperuserto create a superuser for the admin panel. Fill in the details asked.
python systers_portal/manage.py runserverto start the development server. When in testing or production, feed the respective settings file from the command line, e.g. for testing
python systers_portal/manage.py runserver --settings=systers_portal.settings.testing.
- Before commiting run
flake8 systers_portaland fix PEP8 warnings.
python systers_portal/manage.py test --settings=systers_portal.settings.testingto run all the tests.
Run Portal in a Docker container
If you wish to view a speak peek of the Systers Portal, you may use Docker to preview the Portal. Note: The following Docker configuration is not intended to be run in production at the moment. It may be configured to do so in the future.
- Install Docker.
Follow the installation steps for your specific operating system:
- Docker runs natively on a Linux-based system.
- For Windows and Mac OS X, you should follow instructions for installing boot2docker which also installs VirtualBox.
- Install docker-compose. Note: fig has been deprecated. Docker-compose replaces fig.
- Create a new directory on your local system.
git clone email@example.com:systers/portal.gitto clone the Systers Portal repository. After the clone is done, change directory (cd) to the
docker-compose build. This pulls the Docker images required to run the project and installs the necessary dependencies.
- This step will require the Django SECRET_KEY.
docker run -e SECRET_KEY=foobarbaz portal_web.
docker-compose run web python systers_portal/manage.py migrate.
docker-compose run web python systers_portal/manage.py createsuperuserif you wish to create a superuser to access the admin panel.
docker-compose upto start the webserver for the Django Systers Portal project.
- Systers Portal should be running on port 8000.
- If you are on Linux, enter
http://0.0.0.0:8000in your browser.
- If you are using boot2docker on Windows or Mac OS X, enter
http://192.168.59.103:8000/in your browser. If this IP address doesn't work, run
boot2docker ipfrom the command line and replace the previous IP address in the HTTP request with the IP returned by boot2docker.
- If you are on Linux, enter
To build the documentation locally run:
$ cd docs/ $ make html
To view the documentation open the generated
index.html file in browser -
For more information on semantics and builds, please refer to the Sphinx official documentation.
You can view the requirements document here.