Skip to main content

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 a Redis server running on localhost:6379.)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-overcomingbias-pages-0.1.1.tar.gz (86.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-overcomingbias-pages-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-overcomingbias-pages-0.1.1.tar.gz
Algorithm Hash digest
SHA256 16cd03a4f10177cdc395bfa63575406e9f313ab60e688890c87bf31d8ef524bc
MD5 c97a3110a82812687e97ef8ce979c5af
BLAKE2b-256 b012ac79fc21be4b4ae297d63cc414ef3e9a70dd782e1dc1c830b7d0e16b74b4

See more details on using hashes here.

File details

Details for the file django_overcomingbias_pages-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_overcomingbias_pages-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a177145fb2144120af8f1d5dafdab9ee03ce68feead0cfec025161d809c14abf
MD5 f1da8d46fa68659f27af4427728ccb9c
BLAKE2b-256 66e452c89262c61ee21fe1d54bdbfbd959616e8c446319c22a20a66840a83f09

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page