Skip to content

Commit

Permalink
Merge pull request #15 from FreeOurKnowledge/pledge-optional
Browse files Browse the repository at this point in the history
Pledge optional
  • Loading branch information
CooperSmout authored Oct 7, 2020
2 parents 8962f3a + b68bfe7 commit ed7c72a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
56 changes: 55 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,62 @@

## Project structure


```
platform
├── free_our_knowledge
│ ├── __init__.py
│ ├── settings
│ ├── resources
│ ├── urls.py
│ └── wsgi.py
├── docker
│ └── Dockerfile
│ └── docker-compose.yml
│ └── entrypoint.sh
├── manage.py
└── requirements.txt
```

## Getting Started


### Development installation

1. CLone the repository locally:

```
git clone [email protected]:FreeOurKnowledge/platform.git
```

2. Create a new virtual environment and activate it:

```
python3 -m venv fok_env
source fok_env/bin/activate
```

3. Install all of the dependencies:

```
pip install -r requirements.txt
```

4. Generate the database tables:

```
python manage.py migrate --noinput
```

4. Start the project:

```python
python manage.py runserver
```

If everything works the platform should be available on http://127.0.0.1:8000/.

### Docker installation

1. Build the development image. From the project root:

sudo docker build . -f ./docker/Dockerfile -t fok_platform
Expand All @@ -19,3 +71,5 @@
3. [Configure credentials]??

4. Open a browser to http://localhost:8080/ to view the application (if using Chromebook, go to http://penguin.termina.linux.test:8080/)


4 changes: 2 additions & 2 deletions apps/fok/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class Meta:

user = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True, related_name='pledges')
campaign = models.ForeignKey(Campaign, on_delete=models.SET_NULL, null=True, related_name='pledges')
implication = models.FloatField(verbose_name='Threshold')
author_position = models.ManyToManyField(EnabledAuthorPosition)
implication = models.FloatField(verbose_name='Threshold', blank=True, default=None)
author_position = models.ManyToManyField(EnabledAuthorPosition, blank=True, default=None)
allow_public_name = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Expand Down

0 comments on commit ed7c72a

Please sign in to comment.