core.spaces — Spaces/Processes

spaces.admin — Administration

e-cidadania administration models for django-admin. This administration models will make their respective data models available for management.

class core.spaces.admin.EntityAdmin(admin.ModelAdmin)

Entities administration model.

List fields:name, website, space
Search fields:name
class core.spaces.admin.EntityInline(admin.TabularInline)

TabularInline view for entities.

model

alias of Entity

class core.spaces.admin.SpaceAdmin(admin.ModelAdmin)

Administration view for django admin to create spaces. The save() method is overriden to store automatically the author of the space.

List fields:name, description, date
Search fields:name
class core.spaces.admin.DocumentAdmin(admin.ModelAdmin)

Administration view to upload/modify documents. The save() method is overriden to store the author automatically.

List fields:title, space, docfile, author, pub_date
Search fields:title, space, author, pub_date
class core.spaces.admin.EventAdmin(admin.ModelAdmin)

Meetings administration model.

List fields:title, space, meeting_date
Search fields:title

spaces.models — Data models

class core.spaces.models.Space(models.Model)

Spaces model. This model stores a “space” or “place” also known as a participative process in reality. Every place has a minimum set of settings for customization.

There are three main permission roles in every space: administrator (admins), moderators (mods) and regular users (users).

class core.spaces.models.Entity(models.Model)

This model stores the name of the entities responsible for the creation of the space or supporting it.

class core.spaces.models.Document(models.Model)

This models stores documents for the space, like a document repository, There is no restriction in what a user can upload to the space.

Methods :get_file_ext, get_file_size
class core.spaces.models.Event(models.Model)

Meeting data model. Every space (process) has N meetings. This will keep record of the assistants, meeting name, etc.

spaces.forms — Forms

This module contains all the space related forms, including the forms for documents, meetings and entities. Most of the forms are directly generated from the data models.

class core.spaces.forms.SpaceForm(ModelForm)

Returns a form to create or edit a space. SpaceForm inherits all the fields from the Space data model.

Return type:HTML Form

New in version 0.1.

class core.spaces.forms.DocForm(ModelForm)

Returns a form to create or edit a space related document, based on the spaces.Document data model.

Return type:HTML Form

New in version 0.1.

class core.spaces.forms.EventForm(ModelForm)

Returns a form to create or edit a space related meeting, based on the spaces.Meeting data model.

Return type:HTML Form

New in version 0.1.

EntityFormSet — modelformset_factory

spaces.views — Views

General spaces views

Spaces views

Document views

Meeting views