Skip to content
The app behind the Open Technology Fund
Branch: master
Clone or download
Latest commit f9bfd19 Jun 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update to python-3.6.8. Mar 8, 2019
.github/ISSUE_TEMPLATE Update issue templates Mar 27, 2019
addressfield Add Kosovo to the address field. Jan 8, 2019
opentech Merge pull request #669 from OpenTechFund/updates/misc-packages Jun 14, 2019
public Move local jquery and normalize files to standard assets dir. Update … May 20, 2019
vagrant Wagtail form Page and fix vagrant provision file Dec 18, 2018
.eslintignore Move local jquery and normalize files to standard assets dir. Update … May 20, 2019
.eslintrc.yaml Move local jquery and normalize files to standard assets dir. Update … May 20, 2019
.gitignore Setup the dev server for react Dec 20, 2018
.isort.cfg cookiecutter build Dec 11, 2017
.jscsrc cookiecutter build Dec 11, 2017
.sass-lint.yml ignore target ie 11 mixin in lint order Mar 1, 2019
.travis.yml Make flake8 work again on travisci. Oct 25, 2018
LICENSE cookiecutter build Dec 11, 2017
Procfile Adding clear_cache command to release step in Heroku Procfile. May 10, 2019
README.md Very minor commit just to make a change. May 10, 2019
SECURITY.md Update SECURITY.md Nov 19, 2018
Vagrantfile Revert "Fix React dev server not serving outside VM" Jan 14, 2019
app.json Correcting Heroku pipline app.json parameters. Sep 19, 2018
fabfile.py Update the database names and dump locations Jan 24, 2018
gulpfile.js Add in the analysis tool Feb 15, 2019
manage.py Update the project with the latest changes from cookiecutter Jan 2, 2018
package-lock.json Update node packages to fix security issues. May 31, 2019
package.json Update node packages to fix security issues. May 31, 2019
requirements.txt Minor updated to all pckages that does not have significant issues. Jun 10, 2019
runtime.txt Update to python-3.6.8. Mar 8, 2019
setup.cfg Make flake8 work again on travisci. Oct 25, 2018
stellar.yaml cookiecutter build Dec 11, 2017

README.md

opentech.fund Wagtail site

Contributing

  1. Make changes on a new branch, including a broad category and the ticket number if relevant e.g. feature/123-extra-squiggles, fix/newsletter-signup.
  2. Push your branch to the remote.
  3. Edit details as necessary.

If you need to preview work on staging, this can be merged and deployed manually without making a merge request. You can still make the merge request as above, but add a note to say that this is on staging, and not yet ready to be merged to master.

Setting up a local build

This repository includes a Vagrantfile for running the project in a Debian VM.

To set up a new build:

git clone git@github.com:OpenTechFund/opentech.fund.git
cd opentech.fund
vagrant up
vagrant ssh

Then within the SSH session:

dj migrate
dj createcachetable
dj createsuperuser
djrun

This will make the site available on the host machine at: http://127.0.0.1:8000/

Updating front-end files

Any changes to sass and js files need to be made within the opentech/static_src directory. They then need to be compiled with the help of "gulp".

Start a vagrant SSH session and go to the project root directory.

vagrant ssh
cd /vagrant

Here you can run a number of different "gulp" commands. The two most useful are likely:

gulp watch

That will watch all fles for changes and build them with maps etc., perfect for development. (It will also run the "collecstatic" command, useful when running the site with a production server and not the built in dev server.)

If you are working on the React components then it may be worth just using one of the two following commands. They should do the same thing, but the npm command calls Webpack direct.

WARNING: You cannot use Webpack watch and Hot Module Reload within vagrant, it must be run from your own installation of node. All other commands will work.
gulp watch:app
# OR
npm run webpack-watch

To build the assets which get deployed, use the following. The deployment scripts will handle this, and the files do not need to be committed.

gulp build

For more command see the gulpfile.js file.

Running tests

Run all tests for the project with the following command within the SSH session:

DJANGO_SETTINGS_MODULE=opentech.settings.test python manage.py test --keepdb
You can’t perform that action at this time.