Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
ENABLE_INFINITE_CORRIDOR=True
CELERY_TASK_ALWAYS_EAGER=True
DJANGO_LOG_LEVEL=INFO
LOG_LEVEL=info
MITOPEN_BASE_URL=http://od.odl.local:8063
MITOPEN_COOKIE_NAME=discussions
MITOPEN_COOKIE_DOMAIN=odl.local
MITOPEN_HOSTNAME=od.odl.local
MITOPEN_MAX_COMMENT_DEPTH=6
MITOPEN_JWT_SECRET=
MITOPEN_USE_S3=False
INDEXING_API_USERNAME=mitodl
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,11 @@ jobs:
MITOPEN_SECURE_SSL_REDIRECT: 'False'
MITOPEN_DB_DISABLE_SSL: 'True'
MITOPEN_FEATURES_DEFAULT: 'True'
MITOPEN_REDDIT_URL: https://reddit.local
MITOPEN_REDDIT_VALIDATE_SSL: 'False'
MITOPEN_REDDIT_CLIENT_ID: od_client_id
MITOPEN_REDDIT_SECRET: od_client_secret # pragma: allowlist secret
OPENSEARCH_URL: localhost:9200
CELERY_TASK_ALWAYS_EAGER: 'True'
CELERY_BROKER_URL: redis://localhost:6379/4
CELERY_RESULT_BACKEND: redis://localhost:6379/4
TIKA_CLIENT_ONLY: 'True'
AKISMET_IS_TESTING: 'True'
MITOPEN_BASE_URL: http://localhost:8063/
MAILGUN_KEY: fake_mailgun_key
MAILGUN_SENDER_DOMAIN: other.fake.site
Expand Down
6 changes: 3 additions & 3 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
release: bash scripts/heroku-release-phase.sh
web: bin/start-nginx bin/start-pgbouncer newrelic-admin run-program uwsgi uwsgi.ini
worker: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q spam,default --concurrency=2 -B -l $MITOPEN_LOG_LEVEL
extra_worker_2x: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q spam,digest_emails,edx_content,default --concurrency=2 -l $MITOPEN_LOG_LEVEL
extra_worker_performance: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q spam,digest_emails,edx_content,default -l $MITOPEN_LOG_LEVEL
worker: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q default --concurrency=2 -B -l $MITOPEN_LOG_LEVEL
extra_worker_2x: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q edx_content,default --concurrency=2 -l $MITOPEN_LOG_LEVEL
extra_worker_performance: bin/start-pgbouncer newrelic-admin run-program celery -A open_discussions.celery:app worker -Q edx_content,default -l $MITOPEN_LOG_LEVEL
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,6 @@ MAILGUN_KEY
Additionally, you'll need to set `MAILGUN_RECIPIENT_OVERRIDE` to your own email address so
any emails sent from the app will be delivered to you.

### Enabling article posts
It is based on text posts but allows the user to add a cover image, provides richer editing capabilities, etc.
To enable it, run through these steps:

1. Adjust channel settings to allow article posts. This can be done in one of two ways:
1. Visit the channel settings page in the running app when logged in as a moderator user.
Select the article checkbox under "Allowed Post Types" and save.
(There should be an option in the channel page header to visit the settings page, or
you can navigate there directly: `/c/<channel_name>/settings/`).
1. Update the channel directly in a Django shell:

```python
from channels.models import Channel
# To allow all post types for the channel...
Channel.objects.filter(name="SOME_CHANNEL_NAME").update(
allowed_post_types=Channel.allowed_post_types.link | Channel.allowed_post_types.self | Channel.allowed_post_types.article
)
```
1. Set up environment variables for the article UI. In `.env`, add:
```python
FEATURE_ARTICLE_UI=True
# Ask a fellow developer for the following values...
CKEDITOR_ENVIRONMENT_ID=...
CKEDITOR_SECRET_KEY=...
CKEDITOR_UPLOAD_URL=...
```

### Enabling image uploads to S3

:warning: **NOTE: Article cover image thumbnails will be broken unless this is configured** :warning:
Expand All @@ -116,16 +89,6 @@ broken images unless you configure your app to upload to S3. Steps:

These values can be copied directly from the Open Discussions CI Heroku settings, or a
fellow dev can provide them.

### Enabling widgets

To enable channel widgets, run through these steps:

1. Run the management command to ensure that your channels are properly configured
```bash
docker-compose run --rm web ./manage.py backpopulate_channel_widget_lists
```
1. Add `FEATURE_WIDGETS_UI=True` to your `.env`

### Enabling searching the course catalog on opensearch

Expand Down
64 changes: 2 additions & 62 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@
"OPENSEARCH_URL": {
"description": "URL for connecting to OpenSearch cluster"
},
"ENABLE_INFINITE_CORRIDOR": {
"description": "Boolean indicating whether infinite corridor is enabled",
"required": false
},
"GA_TRACKING_ID": {
"description": "Google analytics tracking ID",
"required": false
Expand All @@ -173,7 +169,7 @@
"required": false
},
"INDEXING_API_USERNAME": {
"description": "Reddit username used for indexing"
"description": "Username used for indexing"
},
"INDEXING_ERROR_RETRIES": {
"description": "Number of times to retry an indexing operation on failure",
Expand Down Expand Up @@ -309,24 +305,12 @@
"MITOPEN_BASE_URL": {
"description": "Base url to link users to in emails"
},
"MITOPEN_CHANNEL_POST_LIMIT": {
"description": "Number of posts to display on the frontpage and channels",
"required": false
},
"MITOPEN_COOKIE_NAME": {
"description": "Name of the cookie for the JWT auth token"
},
"MITOPEN_COOKIE_DOMAIN": {
"description": "Domain for the cookie for the JWT auth token"
},
"MITOPEN_DEFAULT_CHANNEL_BACKPOPULATE_BATCH_SIZE": {
"description": "Number of users to sync per backpopulate batch",
"required": false
},
"MITOPEN_RELATED_POST_COUNT": {
"description": "Number of related posts to fetch",
"required": false
},
"MITOPEN_DB_CONN_MAX_AGE": {
"value": "0"
},
Expand Down Expand Up @@ -360,47 +344,15 @@
"MITOPEN_FROM_EMAIL": {
"description": "E-mail to use for the from field"
},
"MITOPEN_FRONTPAGE_DIGEST_MAX_EPISODES": {
"description": "Max podcast episodes in open digest emails",
"required": false
},
"MITOPEN_FRONTPAGE_DIGEST_MAX_POSTS": {
"description": "Max posts in open digest emails",
"required": false
},
"MITOPEN_LOG_LEVEL": {
"description": "The log level for the application",
"required": true,
"value": "INFO"
},
"MITOPEN_HOT_POST_REPAIR_DELAY": {
"description": "How many second to wait until attempting to repair a missing post",
"required": false
},
"MITOPEN_HOT_POST_REPAIR_LIMIT": {
"description": "Maximum number of posts in the history to check for a missing post",
"required": false
},
"MITOPEN_JWT_SECRET": {
"description": "Shared secret for JWT auth tokens",
"required": true
},
"MITOPEN_MAX_COMMENT_DEPTH": {
"description": "Maximum depth of a comment",
"required": false
},
"MITOPEN_NOTIFICATION_ATTEMPT_RATE_LIMIT": {
"description": "The per-worker rate limit at which to generate pending EmailNotification frontpage records",
"required": false
},
"MITOPEN_NOTIFICATION_ATTEMPT_CHUNK_SIZE": {
"description": "The size of each attempt batch",
"required": false
},
"MITOPEN_NOTIFICATION_SEND_CHUNK_SIZE": {
"description": "The size of each sending batch",
"required": false
},
"MITOPEN_SECURE_SSL_REDIRECT": {
"description": "Application-level SSL redirect setting.",
"value": "True"
Expand All @@ -410,11 +362,7 @@
"required": false
},
"MITOPEN_TITLE": {
"description": "Title of the open discussions site",
"required": false
},
"MITOPEN_TOS_URL": {
"description": "URL to the Terms of Service",
"description": "Title of the MIT Open site",
"required": false
},
"MITOPEN_SUPPORT_EMAIL": {
Expand Down Expand Up @@ -524,14 +472,6 @@
"description": "The log level for Sentry",
"required": false
},
"SPAM_EXEMPT_EMAILS": {
"description": "list of email regex patterns that are exempt from spam checking",
"required": false
},
"STAFF_MOIRA_LISTS": {
"description": "moira lists of users who can create public lists",
"required": false
},
"STATUS_TOKEN": {
"description": "Token to access the status API."
},
Expand Down
2 changes: 1 addition & 1 deletion authentication/middleware_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_process_view_blocked_ip_middleware( # pylint:disable=too-many-argument
):
"""Check that `process_view` raises a PermissionDenied error when appropriate"""
user = UserFactory.create(is_superuser=is_super)
view = "search" if exempt_view else "channel-list"
view = "search"
request = rf.post(reverse(view))
request.user = user

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading