django-planet 0.8.3

Django app to build a planet, RSS/Atom feeds aggregator.

Changing your settings.py

Modifiy your projects settings.py file following the next steps:

  1. Check your INSTALLED_APPS:
INSTALLED_APPS = (
  # django required contrib apps
  'django.contrib.sites',
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'django.contrib.sitemaps',
  # 3rd-party required apps:
  'pagination',
  'tagging',
  'pinax_theme_bootstrap',
  # and finally:
  'planet',
)
  1. Configure your database. Here is an example using mysql:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'planet',                      # Or path to database file if using sqlite3.
        'USER': '<myuser>',                      # Not used with sqlite3.
        'PASSWORD': '<mypass>',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}
  1. Choose a site id:
SITE_ID = 1
  1. Include the following context processors:
TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'django.core.context_processors.tz',
    'django.core.context_processors.request',
    'django.contrib.messages.context_processors.messages',
    'planet.context_processors.context',
)

Please do not forget planet.context_processors.context!

  1. Check your middlewares to include:
MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'pagination.middleware.PaginationMiddleware',
)

Please do not forget pagination.middleware.PaginationMiddleware middleware!

  1. Add planet configuration variables:
PLANET = {
    "USER_AGENT": "My Planet/1.0",
}
  1. Properly configure your static files root directory:
STATIC_URL = '/static/'
  1. Also your projects templates root directory:
TEMPLATE_DIRS = (
    '/path/to/planet/project/templates',
    # other paths...
)
  1. And your template loaders must look like these:
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    # some other template loaders here...
)
  1. Finally in your project's templates directory create a site_base.html template if you don't already have one:
{% extends "base.html" %}
  1. Optionally, modify cookie names so you don't have login conflicts with other projects:
LANGUAGE_COOKIE_NAME = "myplanetlng"
SESSION_COOKIE_NAME = "myplanetid"

Congratulations! Your settings are complete. Now you'll need to change other files in order to get a running project.

Enable planet urls

  1. Add the planet urls include to your project's urls.py (remember to also include admin urls so you can use the admin to manage your planet!):
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^', include('planet.urls')),
    url(r'^admin/', include(admin.site.urls)),
    # ... other url bits...
)

Syncdb and add some feeds!

  1. Then create the database structure:

    ./manage.py syncdb
    
  2. Add some feeds:

    python manage.py planet_add_feed http://www.economonitor.com/feed/rss/
    python manage.py planet_add_feed http://www.ft.com/rss/home/us
    
  3. And surely you'll want to add a cron entry to periodically update them all:

    30 * * * * python manage.py planet_update_all_feeds
    

This attempts to pull in new posts every 30 minutes.

  1. Now you're done. Just run:

    ./manage.py runserver
    

and browse your planet at http://localhost:8000/ in your favorite browser!

BSD

Author

Matias Agustin Mendez

Pip

django-planet==0.8.3

Classifiers

  • Development Status :: 5 - Production/Stable
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Programming Language :: Python :: 2.6
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.2
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3.1
  • License :: OSI Approved :: BSD License
  • Topic :: Internet :: WWW/HTTP
  • Programming Language :: Python :: 3.0
  • Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary
File Type Python Version Uploaded On Downloads
django-planet-0.8.3.tar.gz Source May 16, 2015 828
Version Release Date
0.8.3 May 16, 2015
0.8.2 May 16, 2015
0.8.1 May 16, 2015
0.8 May 15, 2015
0.7.6 May 15, 2015
0.7.5 May 15, 2015
0.7.4 May 15, 2015
0.7.3 April 27, 2015
0.7.2 April 23, 2015
0.7 April 19, 2015
0.6.2 March 29, 2014
0.6.1 March 29, 2014
0.6 March 28, 2014
0.5.4 March 23, 2014
0.5.3 March 11, 2014
0.5.2 March 11, 2014
0.5.1 Jan. 14, 2014
0.5 Jan. 13, 2014
0.4.12 Jan. 12, 2014
0.4.11 May 14, 2013
0.4.10 March 31, 2013
0.4.9 March 31, 2013
0.4.8 March 24, 2013
0.4.7 March 24, 2013
0.4.6 March 23, 2013
0.4.5 March 23, 2013
0.4.4 March 23, 2013
0.4.3 March 21, 2013
0.4.2 March 21, 2013
0.4.1 March 19, 2013
0.4 March 18, 2013
0.3 March 18, 2013
0.2.2 March 16, 2013
0.1.3a0 Sept. 14, 2010
0.1.2a0 June 25, 2010
0.1.1a0 June 25, 2010
0.1 June 22, 2010
Date Package Version Action
Aug. 26, 2015, 12:21 a.m. django-planet 0.6.1 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.4.6 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.4.7 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.4.4 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.1.1a0 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.4.1 Release Created
Aug. 26, 2015, 12:21 a.m. django-planet 0.8.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.8.3 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.8.1 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.1.3a0 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.12 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.10 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.11 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.5.3 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.5.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.5.1 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.5 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.3 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.5.4 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.8 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4.9 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7.3 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7.5 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7.4 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.6.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7.6 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.2.2 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.1.2a0 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.6 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.7 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.4 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.5 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.3 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.1 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet 0.8 Release Created
Aug. 26, 2015, 12:20 a.m. django-planet Package Created