django app web interface to Robin Hanson's content
Project description
django-overcomingbias-pages is a standalone Django app which provides a web interface to Robin Hanson’s content.
Features
The main features are:
Scrape content from across the web (overcomingbias, YouTube, Spotify and more) via the admin site.
Search content with django-haystack.
Create sequences (series) of content and export them to PDF, epub, plaintext, or any other format supported by pandoc.
Persistent user accounts.
Configuration
To configure django-overcomingbias-pages, add the following to your settings:
# settings.py
# add required apps
INSTALLED_APPS = [
# required for admin site / user accounts
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
# for collecting static files
"django.contrib.staticfiles",
# django-overcomingbias-api
"ordered_model",
"obapi",
# haystack search
"haystack",
# async tasks
"huey.contrib.djhuey",
# django-overcomingbias-pages
"obpages",
]
# Use the (custom) obpages user model
AUTH_USER_MODEL = "obpages.User"
To configure search, follow the instructions on the haystack doc pages. If you don’t care about search, just add this to your settings:
# settings.py
# dummy backend for django-haystack
HAYSTACK_CONNECTIONS = {
"default": {
"ENGINE": "haystack.backends.simple_backend.SimpleEngine",
},
}
django-overcomingbias-pages uses Huey to run tasks asynchronously. To enable this feature, follow the Django/Huey instructions. A minimal configuration is shown below:
# settings.py
connection_pool = ConnectionPool(host="127.0.0.1", port=6379, db=0, max_connections=100)
# See docs for full list of settings
HUEY = {
"huey_class": "huey.PriorityRedisHuey",
"name": PROJECT_NAME,
"connection": {
"connection_pool": connection_pool,
# see redis-py for more options
# https://redis-py.readthedocs.io/en/latest/connections.html
"read_timeout": 0,
},
"consumer": {
"workers": 4,
"worker_type": "thread",
},
}
(Note that this requires (1) a Redis server running on localhost:6379 and (2) installing via pip install django-overcomingbias-pages[redis].)
Optionally, you can also configure Huey as your email backend.
Bugs/Requests
Please use the GitHub issue tracker to submit bugs or request features.
License
Copyright (c) 2022 Christopher McDonald
Distributed under the terms of the MIT license.
All overcomingbias posts are copyright the original authors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-overcomingbias-pages-0.2.0.tar.gz
.
File metadata
- Download URL: django-overcomingbias-pages-0.2.0.tar.gz
- Upload date:
- Size: 90.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aac4787b43567c683e8b76788e09c9b300492260712b2a33714cf63657f2d44 |
|
MD5 | 91b08939d61aadbfb58ee83b307f8537 |
|
BLAKE2b-256 | 6c01dd4875e7d81f4c01c52bc036f870dfb6baacbeade29ee9c07724f71922b8 |
File details
Details for the file django_overcomingbias_pages-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: django_overcomingbias_pages-0.2.0-py3-none-any.whl
- Upload date:
- Size: 94.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226b8b63a179eac48325b83d1550f9e52cff47dd9f2bc95d0b50127a2921772c |
|
MD5 | 8b4e8a04dc4eee3849ec01eef536342f |
|
BLAKE2b-256 | d74d160124ec31e5614d52d9458c77c53b7bd2a15c83b4259a0c8b18661d3cb5 |