Install¶
Install with the pip package manager.
$ mkvirtualenv myvenv -p python3
$ pip install django
$ pip install django-applepodcast
After creating a project, add podcast to INSTALLED_APPS in settings.py.
INSTALLED_APPS = [
# ...
'podcast',
]
Because the app is primarily model driven, you will want to expose the URL of the show’s feed for submission to Apple Podcasts. Add the URL conf to urls.py.
from django.conf.urls import url, include
urlpatterns = [
# ...
url(r'^podcast/', include('podcast.urls')),
]
If you’re on Django 1.8 or lower, you will need to add the namespace keyword argument to the include() method manually because the convenient app_name attribute in urls.py wasn’t added until Django 1.9.
from django.conf.urls import url, include
urlpatterns = [
# ...
url(r'^podcast/', include('podcast.urls', namespace='podcast')), # < Django 1.9
]
Add the models to your project by migrating the database.
$ python manage.py migrate
Add the default Apple Podcasts categories by loading the fixtures.
$ python manage.py loaddata podcast_category.json
Remember to update your requirements.txt file. In your project directory:
$ pip freeze > requirements.txt