Metadata-Version: 1.1
Name: django-planet
Version: 0.5
Summary: Django app to build a planet, RSS/Atom feeds aggregator.
Home-page: http://github.com/matagus/django-planet
Author: Matias Agustin Mendez
Author-email: me@matagus.com.ar
License: BSD
Description: Usage
        =====
        
        Modifiy your projects ``settings.py`` file following the next steps:
        
        1. Check your ``INSTALLED_APPS`` in your to have installed:
        
        .. code-block:: python
        
          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',
          )
        
        2. Configure your database. Here goes an example using mysql:
        
        .. code-block:: python
        
            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.
                }
            }
        
        3. Choose a site id:
        
        .. code-block:: python
        
          SITE_ID = 1
        
        4. Include the following context processors:
        
        .. code-block:: python
        
            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``!
        
        5. Check your middlewares to include:
        
        .. code-block:: python
        
            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!
        
        5. Add planet configuration variables:
        
        .. code-block:: python
        
            PLANET = {
                "USER_AGENT": "My Planet/1.0",
            }
        
        6. Configure properly your static files root directory:
        
        .. code-block:: python
        
           STATIC_URL = '/static/'
        
        7. Also your projects templates root directory:
        
        .. code-block:: python
        
            TEMPLATE_DIRS = (
                '/path/to/planet/porject/templates',
                # other paths...
            )
        
        7. And your template loaders must look like these:
        
        .. code-block:: python
        
            TEMPLATE_LOADERS = (
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
                # some other template loaders here...
            )
        
        8. Finally in your project's templates directory create a ``site_base.html``
           template if you don't already have one:
        
        .. code-block:: html
        
            {% extends "base.html" %}
        
        
        9. Optionally, modify cookie names so you don't have login conflicts with other
           projects:
        
        .. code-block:: python
        
            LANGUAGE_COOKIE_NAME = "myplanetlng"
            SESSION_COOKIE_NAME = "myplanetid"
        
        Congratulations! Your settings are complete. Now you'll need to:
        
        1. Add the planet urls include to your porjects ``urls.py`` (remember to
           also include admin urls so you can use the admin to manage your planet!):
        
        .. code-block:: python
        
            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...
            )
        
        2. Then create the database structure::
        
             ./manage.py syncdb
        
        3. 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
        
        4. 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 for new posts every 30 minutes.
        
        5. Now you're done. Just run::
        
           ./manage.py runserver
        
        and browse your planet at http://localhost:8000/ in your favorite browser!
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary
