Skip to main content

Just another blogging / podcasting package

Project description

=============================
Django Cast
=============================

.. image:: https://badge.fury.io/py/django-cast.svg
:target: https://badge.fury.io/py/django-cast

.. image:: https://travis-ci.org/ephes/django-cast.svg?branch=master
:target: https://travis-ci.org/ephes/django-cast

.. image:: https://codecov.io/gh/ephes/django-cast/branch/master/graph/badge.svg
:target: https://codecov.io/gh/ephes/django-cast

Just another blogging / podcasting package

Documentation
-------------

The full documentation is at https://django-cast.readthedocs.io.

Installation Screencast
-----------------------
.. raw:: html

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe src="https://www.youtube.com/embed/wPAYfpqg2EQ" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</div>

Quickstart
----------

Install Django Cast::

pip install django-cast

Add django-cast and some dependencies to your ``INSTALLED_APPS``:

.. code-block:: python

INSTALLED_APPS = (
...
"imagekit",
"ckeditor",
"ckeditor_uploader",
"rest_framework.authtoken",
"filepond.apps.FilepondConfig",
"cast.apps.CastConfig",
...
)



Add required settings:

.. code-block:: python

# CKEditor
CKEDITOR_UPLOAD_PATH = "uploads/ckeditor/"
CKEDITOR_IMAGE_BACKEND = "pillow"
AWS_QUERYSTRING_AUTH = False
X_FRAME_OPTIONS = "SAMEORIGIN"
CKEDITOR_CONFIGS = {
"default": {
"removePlugins": "stylesheetparser",
"allowedContent": True,
"enterMode": 2,
},
}

# REST
REST_FRAMEWORK = {
# Use Django's standard django.contrib.auth permissions,
# or allow read-only access for unauthenticated users.
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.TokenAuthentication",
)
}

# django imagekit
IMAGEKIT_DEFAULT_CACHEFILE_STRATEGY="imagekit.cachefiles.strategies.Optimistic"


Add Django Cast's URL patterns:

.. code-block:: python

from django.urls import path

from rest_framework.documentation import include_docs_urls
from rest_framework.authtoken import views as authtokenviews


urlpatterns = [
...
# Cast urls
path("api/api-token-auth/", authtokenviews.obtain_auth_token),
path("docs/", include_docs_urls(title="API service")),
path("ckeditor/", include("ckeditor_uploader.urls")),
# Uploads
path("uploads/", include("filepond.urls", namespace="filepond")),
# Cast
path("/cast", include("cast.urls", namespace="cast")),
...
]

The api token auth urls and the docs urls are both necessary to provide api endpoints
with the right namespace. The `django-filepond <https://github.com/ephes/django-filepond>`_
app is used to dispatch uploads to the right media models.

Features
--------

* Support for responsive images / video / audio media objects
* Use django template syntax for posts allowing you to use custom template tags for galleries etc. for example
* Good looking file uploads via `filepond <https://pqina.nl/filepond/>`_
* Chaptermarks for podcast Episodes

Running Tests
-------------

Does the code actually work?

.. code-block:: shell

source <YOURVIRTUALENV>/bin/activate
(myenv) $ python runtests.py tests

Credits
-------

Tools used in rendering this package:

* Cookiecutter_
* `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
0.1.18 (2018-04-18)
+++++++++++++++++++

* Fixed broken update view due to empty chaptermarks + test
* Fixed two image/video javascript bugs

0.1.17 (2018-04-15)
+++++++++++++++++++

* Added chaptermarks feature
* Duration is now displayed correctly in podlove player
* If an audio upload succeeded, add the uploaded element to podcast audio select form

0.1.16 (2018-03-23)
+++++++++++++++++++

* Finally, rtfd is working again, including screencast

0.1.15 (2018-03-23)
+++++++++++++++++++

* Trying again... rtfd still failing

0.1.14 (2018-03-23)
+++++++++++++++++++

* Added rtfd configuration file to be able to use python 3 :/

0.1.13 (2018-03-22)
+++++++++++++++++++

* Release to update read the docs

0.1.12 (2018-03-22)
+++++++++++++++++++

* Improved installation documentation

0.1.11 (2018-03-21)
+++++++++++++++++++

* Fixed requirements for package

0.1.10 (2018-03-21)
+++++++++++++++++++

* Dont limit the number of items in feed (was 5 items)
* Workaround for ogg files (ending differs for Audio model field name)
* Added opus format to Audio model

0.1.9 (2018-03-12)
++++++++++++++++++

* Added some podcast specific fields to post edit form
* If two audio uploads have the same name, add them to the same model instance
* Added audio file support for post edit form
* Show which audio files already were uploaded

0.1.8 (2018-02-28)
++++++++++++++++++

* Added support for m4v and improved dimension detection for iOS videos
* Added some tests for different video sources

0.1.7 (2018-02-28)
++++++++++++++++++

* forgot linting

0.1.6 (2018-02-28)
++++++++++++++++++

* Use filepond for media uploads (images video)
* Improved portrait video support
* Get api prefix programatically from schema
* Fixed link to podcast in itunes (was feed, now it's post list)
* Set visible date to now if it's not set
* use load static instead of staticfiles (deprecated)
* Fixed language displayed in itunes (you have to set it in base.py in settings)
* Dont try to be fancy, just display a plain list of feed on top of post list site (and podcast feeds only if blog.is_podcast is True)

0.1.5 (2018-11-21)
++++++++++++++++++

* basic feed support (rss/atom) for podcasts
* travis now runs tests with ffprobe, too
* documentation fixes from @SmartC2016 and @oryon-dominik

0.1.4 (2018-11-18)
++++++++++++++++++

* Include css via cast_base.html
* audio fixes

0.1.3 (2018-11-17)
++++++++++++++++++

* Fixed css/static icons
* Merged pull request from SmartC2016 to fix javascript block issue
* Added some documentation

0.1.2 (2018-11-08)
++++++++++++++++++

* Added some requirements
* Release Documentation

0.1.1 (2018-11-07)
++++++++++++++++++

* Travis build is ok.

0.1.0 (2018-11-05)
++++++++++++++++++

* First release on PyPI.


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

django-cast-0.1.18.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_cast-0.1.18-py2.py3-none-any.whl (58.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-cast-0.1.18.tar.gz.

File metadata

  • Download URL: django-cast-0.1.18.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for django-cast-0.1.18.tar.gz
Algorithm Hash digest
SHA256 cfccd5ffeaf20bd602f3e92bb32d67d4fbc0e15b8991c89374e0f55f017c6773
MD5 225af0028088234e419ae3fbe9a2bbba
BLAKE2b-256 ee894a9b945c73c4140b2820015ab2507c6735a37cd1fe71c6f3dcf9a24594f9

See more details on using hashes here.

File details

Details for the file django_cast-0.1.18-py2.py3-none-any.whl.

File metadata

  • Download URL: django_cast-0.1.18-py2.py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for django_cast-0.1.18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e5f67bec8a11156665f62388c43208b8c3a12ec4b5a51163cba601b040ee8deb
MD5 cb6b6cb96b6adeb216cb30287485d532
BLAKE2b-256 8ad83eca75d1a0d1384b5d944c433fa84854e826c0724c4f1cb745f572451093

See more details on using hashes here.

Supported by

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