skip to navigation
skip to content

Not Logged In

django-activities 0.0.1

Activites app for django

Latest Version: 1.2.1

NOTE: This is not stable yet and will likely change! Please don't use in production until the 1.0 release.

[]http://travis-ci.org/InfoAgeTech/django-activities
[]https://coveralls.io/r/InfoAgeTech/django-activities

====================
django-activities
====================
django-activities is a generic python activities module written for django. You can create activities about any object type and share that comment with any object type.

Intallation
===========
Download the source from Github and run::

python setup.py django-activities

Dependencies
============
* [django-generic]https://github.com/InfoAgeTech/django-generic
* [django-core]https://github.com/InfoAgeTech/django-core

Configuration
=============
Config steps:

1. Add to installed apps. django-activities has two dependencies which are listed above. Both need to be added to the installed apps in your settings file.::

INSTALLED_APPS += (
...
'django_core',
'django_generic',
'activities',
...
)


By default, django-activities comes with builtin views. You can use them if you like or totally write your own.

To use the views here are a few configuration steps to follow:

1. Create the html file that will be used as the gateway between your application templates and django-activities templates. A simple template would look something like::

# base_activities.html
{% extends request.base_template %}

{% block content %}
{% block activities_content %}{% endblock %}
{% endblock %}

2. Once you're created the base activities html file, you need to link to it in your settings. In your settings file add the following setting that points to your template you just created::

ACTIVITIES_BASE_TEMPLATE = 'path/to/your/template/base_activities.html'

3. Add the context processor in your settings that's used to retrieve your custom base template::

TEMPLATE_CONTEXT_PROCESSORS = (
...
'activities.context_processors.template_name',
...
)

4. Add the urls::

urlpatterns = patterns('',
...
url(r'^activities', include('activities.urls')),
...
)

5. There are also default .less and .js files that will assist the activities as well. These are optional and the js requires jquery. The files are located at::

/static/activities/js/activities.js
/static/activities/less/activities.less

Form Rendering
--------------
Different apps render forms differently. With that in mind, this app lets you define the location for a function in your settings that will be used to render your forms.

For example, if I want to use the [django-bootstrap-form]https://github.com/tzangms/django-bootstrap-form app to render forms, I would provide the following setting to the template tag form rendering function::

ACTIVITIES_FORM_RENDERER = 'bootstrapform.templatetags.bootstrap.bootstrap'

Then all forms will render using the django-bootstrap-form library. You can optionally provide the following strings that will render that form using table, paragraph or list tags::

ACTIVITIES_FORM_RENDERER = 'as_p' # render form using

tags
ACTIVITIES_FORM_RENDERER = 'as_table' # render form using


ACTIVITIES_FORM_RENDERER = 'as_ul' # render form using
 
  • Downloads (All Versions):
  • 17 downloads in the last day
  • 202 downloads in the last week
  • 992 downloads in the last month