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

Pledge optional #15

Merged
merged 2 commits into from
Oct 7, 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
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)
Comment on lines -128 to +129
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to be changing the behaviour when i run the app locally via docker ... Should it?

I'm running the docker container using the instructions in CONTRIBUTING.md, then going to the app at http://penguin.termina.linux.test:8080/.

When I go to pledge on one of the fake campaign pages (e.g. http://penguin.termina.linux.test:8080/pledge/step-specific-woman-arrive-american), the same three dynamic texts pop up (threshold, author position, public name). I also checked the Site administration (CMS) settings, but can't see an option to remove these texts for a particular campaign.

allow_public_name = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Expand Down