apps.ecidadania.debate — Debates

debate.admin — Administration

debate.models — Data models

This file contains all the data models for the debate module.

class apps.ecidadania.debate.models.Debate(models.Model)

Debate object. In every space there can be unlimited debates, each one of them holds all the related notes. Debates are filtered by space. Start/End dates are for letting users use the debate or not.

New in version 0.1b.

class apps.ecidadania.debate.models.Note(models.Model)

The most important object in every debate, the message. It has a coordinates value to determine the position of the note in its debate.

New in version 0.1b.

debate.forms — Forms

This file contains all the forms for the debate modules.

class apps.ecidadania.debate.forms.DebateForm(ModelForm)

Returns an empty form for creating a new Debate.

Return type:HTML Form

New in version 0.1b.

class apps.ecidadania.debate.forms.NoteForm(ModelForm)

Returns an HTML Form to create or edit a new ‘note’ or ‘proposal’ like it’s called on the sociologists argot.

Return type:HTML Form

New in version 0.1b.

debate.views — Views

These are the views that control the debates.

apps.ecidadania.debate.views.add_new_debate(request, space_name)

Create a new debate. This function returns two forms to create a complete debate, debate form and phases formset.

New in version 0.1.5.

Attributes :debate_form, row_formset, column_formset
Context :form, rowform, colform, get_place, debateid
apps.ecidadania.debate.views.get_debates(request)

Get all debates and serve them through JSON.

apps.ecidadania.debate.views.create_note(request, space_name)

This function creates a new note inside the debate board. It receives the order from the createNote() AJAX function. To create the note first we create the note in the DB, and if successful we return some of its parameters to the debate board for the user. In case the petition had errors, we return the error message that will be shown by jsnotify.

New in version 0.1.5.

apps.ecidadania.debate.views.update_note(request, space_name)

Updated the current note with the POST data. UpdateNoteForm is an incomplete form that doesn’t handle some properties, only the important for the note editing.

apps.ecidadania.debate.views.delete_note(request, space_name)

Deletes a note object.

class apps.ecidadania.debate.views.ViewDebate(DetailView)

View a debate.

Context :get_place, notes, columns, rows
class apps.ecidadania.debate.views.ListDebates(ListView)

Return a list of debates for the current space.

Context :get_place