Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Swap the order between running and initial setup on README.md (#136) #142

Merged
merged 4 commits into from
Aug 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,38 @@ This project requires [Docker](https://docs.docker.com/install/) and

### Settings

To run the API, you must copy the `.env.sample` to a `.env` file. You can edit it accordingly if you want run in a production env.
To run the API, you must copy the `.env.sample` to a `.env` file. You can edit
it accordingly if you want run in a production env.

### Running
#### Creating the container

Starting the application:
You need to create the docker container:

```sh
$ docker-compose up
$ docker-compose up -d
```

The website and [API](#api) will be available at
[`localhost:8000`](http://localhost:8000) and the Jupyter at
[`localhost:8888`](http://localhost:8888).

### Database

#### Initial setup
#### Database initial setup

You should create your database by applying migrations:

```sh
$ docker-compose run django ./manage.py migrate
```

#### Bringing data in
### Running

To run the project locally, you can simply use this command:

```sh
$ docker-compose up
```

The website and [API](#api) will be available at
[`localhost:8000`](http://localhost:8000) and the Jupyter at
[`localhost:8888`](http://localhost:8888).

### Bringing data in your database

Your local `data/` directory is mapped, inside the container, to `/mnt/data`.
Each command uses a CSV (compressed as `.xz` or not) from a public and
Expand Down
2 changes: 1 addition & 1 deletion perfil/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def home(request):
return redirect("https://perfilpolitico.serenata.ai/")
return JsonResponse({'data':"API do Perfil Politico está online."}, safe=False)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nice! Thanks :)



class CandidateListResource(DjangoResource):
Expand Down