Vous voici sur le Git Rural du CRAW

...
 
Commits (2)
*.pyc
*.orig
*.ipynb
*.key
.pylintrc
.vscode
.DS_Store
......
......@@ -10,7 +10,7 @@ TresoFerme, a simplified farm cash flow management tool, to help producers reapp
## Installation
### 1. Clone repo and configure virtualenv
#### 1. Clone repo and configure virtualenv
```bash
$ git clone git@gitrural.cra.wallonie.be:craw-app/tresoferme.git
......@@ -20,14 +20,14 @@ $ pipenv shell
$ cd source # DO NOT FORGET!!!
```
### 2. Check django install
#### 2. Check django install
```bash
(tresoferme) $ python -m django --version
# This should return django version number, 3 or upper, like 3.0.7
```
### 3. Check everything has been correctly installed
#### 3. Check everything has been correctly installed
```bash
(tresoferme) $ python manage.py check
```
......@@ -37,7 +37,7 @@ File "/home/pat/.local/share/virtualenvs/tresoferme-NMZJAftp/lib/python3.6/site-
from django.utils.six import BytesIO
ModuleNotFoundError: No module named 'django.utils.six'
```
Error raised until [django3 features](https://github.com/nigma/django-easy-pdf/pull/73/files) integration
Error raised since [django3 features](https://github.com/nigma/django-easy-pdf/pull/73/files) is not yet integrated in latest version
Edit the file and change **Line 12**
......@@ -51,12 +51,13 @@ to
from six import BytesIO
```
### 4. run the shell accounts4sqlite.sh
#### 4. run the shell source.accounts4sqlite.sh
```bash
(tresoferme) $ sh accounts4sqlite.sh
```
This shell is just changing profile foreign key from User to Profile in "source.accounts.models.py" file
### 5. Launch localhost server
#### 5. Launch localhost server
```bash
(tresoferme) $ python manage.py runserver
```
......@@ -64,6 +65,31 @@ from six import BytesIO
Load the site at http://127.0.0.1:8000
#### 6. Connect using the following credentials:
usernames: admin, manager, demo, eleveur, maraicher
password: mybestpasswd
1. admin: allows to access django-admin and change key parameters in the database ie: django_site, money_unitlist, accounts_supportstructure, etc.
2. manager: allows you to manage you users: eleveur & maraicher. Go to top right menu and select 'Mes utilisateurs'
3. demo: simple test user
4. eleveur: stockbreeding example
5. maraicher: market gardening example
## Mailing from TresoFerme
If you want to use mailing from localhost (@SignIn for instance), you have to adapt EMAIL_HOST_USER and EMAIL_HOST_PASSWORD in settings_localhost.json file
```json
"EMAIL_HOST_USER": "hello@google.be",
"EMAIL_HOST_PASSWORD": "mybestpasswd",
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
......
......@@ -3,7 +3,7 @@ __email__ = 'p.houben@cra.wallonie.be'
__copyright__ = 'Copyright 2018-2020, Patrick HOUBEN'
__license__ = 'MIT'
__date__ = '2020-05-01'
__version__ = '1.3.1'
__version__ = '1.4.0'
__status__ = 'Stable'
# Version synonym
......
......@@ -60,7 +60,14 @@
<td>
<p>Mineur: Ajout source GitRural en bas de page</p>
</td>
</tr>
</tr>
<tr>
<td>1.4.0</td>
<td>26/06/2020</td>
<td>
<p>Majeur: Adaptations pour installation en local avec base de données SQLite</p>
</td>
</tr>
</tbody>
......