Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #225 from chosak/django-1.11
Browse files Browse the repository at this point in the history
Add Django 1.11 support to this project
  • Loading branch information
chosak authored Jul 20, 2018
2 parents 02869e9 + 926af5f commit 0a724eb
Show file tree
Hide file tree
Showing 22 changed files with 121 additions and 512 deletions.
10 changes: 2 additions & 8 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
[run]
omit =
../*admin*
../*urls*
retirement_api/migrations/*
setup.py
retirement_api/settings.py
source=retirement_api

[report]

exclude_lines =
exclude_lines=
pragma: no cover
def __unicode__
if __name__ == .__main__.:
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ python:
- '2.7'
cache: pip
env: DJ_KEY=testkey
before_install:
- nvm use 6
install:
- pip install -r requirements.txt
- pip install coveralls
- pip install coveralls tox
before_script:
- npm install -g bower gulp-cli
- bower install
- npm install -g bower gulp-cli
- bower install
script:
- cp test_settings.py settings.py
- ./manage.py migrate
- coverage run --source='.' manage.py test
- tox
- python2.7 setup.py bdist_wheel
- ls dist/*
after_success:
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ Tú puedes ver este app en español por poner `/es` al parte final del url.
* [virtualenvwrapper](https://virtualenvwrapper.readthedocs.org/en/latest/)
* [Node](http://nodejs.org/)
* [Gulp](http://gulpjs.com/)
* [Bower](https://bower.io/)

### Code dependencies
* [Django 1.8](https://docs.djangoproject.com/en/1.8/)
* [Django 1.8-1.11](https://docs.djangoproject.com/en/1.11/)
* [BeautifulSoup4](http://www.crummy.com/software/BeautifulSoup/bs4/doc/)
* [Python-dateutil](https://dateutil.readthedocs.org/en/latest/)
* [Requests](http://docs.python-requests.org/en/latest/)
Expand All @@ -47,7 +48,7 @@ mkvirtualenv retirement
git clone https://github.com/cfpb/retirement.git
cd retirement
setvirtualenvproject
pip install -r requirements.txt
pip install -e '.[testing]'
```

Build the front-end requirements and the JavaScript files.
Expand All @@ -66,23 +67,24 @@ Fire up a development server.
python manage.py runserver
```

The "Before You Claim" page should load at `localhost:8000/retirement/before-you-claim/`.
The "Before You Claim" page should load at `localhost:8000/before-you-claim/`.

### Usage notes
- The app is set up to run inside [consumerfinance.gov](http://www.consumerfinance.gov), so if you run it locally, some fonts may not load because of [Cross-Origin Resource Sharing](http://www.w3.org/TR/cors/) policies.
- The app sends http requests to the Social Security Administration's [Quick Calculator](http://www.ssa.gov/OACT/quickcalc/index.html) to get benefit estimates for the chart.

### How to run software tests
- You can use nose to run the Python test suite and see code coverage information:
- To run the Python tests, install [tox](https://tox.readthedocs.io/en/latest/) and then run it:

```bash
tox
```

```bash
./pytest.sh
```
- You can run the JavaScript tests with:

```bash
npm test
```
```bash
npm test
```

## Additional documentation
* [Front-end documentation](front-end.md)
Expand Down
9 changes: 0 additions & 9 deletions requirements.txt

This file was deleted.

Binary file modified retirement_api/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 0 additions & 4 deletions retirement_api/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,6 @@ msgstr "Nuestra herramienta aplica aumentos en sus beneficios estimados inmediat
msgid "The tool gives estimates for people ages 22 to 70"
msgstr "La herramienta proporciona estimaciones para las personas entre las edades de 22 a 70 años"

#:
msgid "about"
msgstr "/retirement/before-you-claim/about/es/"

#:
msgid "Planning for Retirement: Before you claim"
msgstr "Planifique para su Jubilación: Antes de solicitar"
Expand Down
181 changes: 0 additions & 181 deletions retirement_api/templates/base.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h3 class="retirement-age">{% trans "About your early benefit claiming age:" %}<
</div>

<p class="learn-how">
<a href="{% trans "about" %}" target="_blank" rel="noopener noreferrer">
<a href="{% url about_view_name %}" target="_blank" rel="noopener noreferrer">
{% trans "Where do these numbers come from?" %}
</a>
</p>
Expand Down
Loading

0 comments on commit 0a724eb

Please sign in to comment.