You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better fixtures for local development & Review Apps (#134)
* [docs] Update contributing guide for installing pip packages & i18n
* Install factory_boy
* Add UserFactory and ProjectFactory
* Install django-extensions, IPython
* Add factories
* Continue adding factories
* Add fuzziness to results
* Add more pages and environments to fixtures
* Fix RuntimeWarning due to timezones
Warning fixed: DateTimeField Audit.created_at received a naive datetime (2020-03-19 17:47:08.432696) while time zone support is active.
* Use new fixtures in docs & review apps
* Add doc section to reset DB data
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+46-1
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,11 @@ To edit a piece of documentation, you can click on the “Edit this page” link
16
16
17
17

18
18
19
+
## Internationalization
20
+
21
+
Falco uses [`react-intl`](https://github.com/formatjs/react-intl) under the hood to manage internationalization. It detects the language of the user’s browser and serves that locale if available, otherwise defaults to English.
22
+
If you spot a mistake in one of the translations available, or would like to translate Falco to your language, please edit (or create) the appropriate JSON file in `frontend/translations` and submit a pull request.
23
+
19
24
## Local development on Falco
20
25
21
26
This section will guide you through installing Falco on your development machine, so that you can work on your feature or bug fix locally before submitting a PR.
@@ -68,4 +73,44 @@ The project should now be running at [localhost:3000](http://localhost:3000). Yo
68
73
To access both these interfaces, you can login using the following credentials:
69
74
70
75
- username: `admin`
71
-
- password: `admin`
76
+
- password: `admin`
77
+
78
+
### To reset the database to its original state (with fixtures)
79
+
80
+
- Ensure that nothing is connected to your database (Django shell, Postgres GUI…)
81
+
- Run `docker-compose exec backend ./manage.py reset_db`
82
+
- Run `make fixtures/load`
83
+
84
+
### Add a new pip package to Falco’s backend
85
+
86
+
To add a Django package in Falco’s backend:
87
+
88
+
- Start the backend:
89
+
90
+
```sh
91
+
make backend/start
92
+
```
93
+
94
+
- Once the backend is up and running, install your package inside the docker container (this may take a few minutes):
0 commit comments