seshat.apps.core.forms

Attributes

CommentPartFormSet

ReferenceFormSet10

ReferenceFormSet2

ReferenceFormSet2_UPGRADE

ReferenceFormSet5

Classes

BaseReferenceFormSet

Base formset for adding or updating multiple references to a comment.

CapitalForm

Form for adding or updating a new capital in the database.

CitationForm

Form for adding or updating a new citation in the database.

NgaForm

Form for adding or updating a new NGA in the database.

PolityForm

Form for adding or updating a new polity in the database.

PolityUpdateForm

Form for adding or updating an existing polity in the database.

ReferenceForm

Form for adding or updating a new reference in the database.

ReferenceWithPageForm

Form for adding or updating a new reference with page numbers in the database.

ReferenceWithPageForm_UPGRADE

ReligionForm

Form for adding or updating a new religion in the database.

SeshatCommentForm

Form for adding or updating a new comment in the database.

SeshatCommentForm2

SeshatCommentPartForm

Form for adding or updating a new comment part in the database.

SeshatCommentPartForm10

SeshatCommentPartForm2

SeshatCommentPartForm2_UPGRADE

SeshatCommentPartForm5

SeshatPrivateCommentForm

Form for adding or updating a new private comment in the database.

SeshatPrivateCommentPartForm

Form for adding or updating a new private comment part in the database.

SignUpForm

VariablehierarchyFormNew

Module Contents

class seshat.apps.core.forms.BaseReferenceFormSet

Bases: django.forms.formsets.BaseFormSet

Base formset for adding or updating multiple references to a comment.

add_fields(form, index)

Add fields to the form.

Parameters:
  • form (Form) – The form to add fields to.

  • index (int) – The index of the form.

Returns:

None

class seshat.apps.core.forms.CapitalForm

Bases: django.forms.ModelForm

Form for adding or updating a new capital in the database.

class Meta
Noindex:

fields = ('name', 'latitude', 'longitude', 'current_country', 'alternative_names', 'is_verified',...
labels
model
widgets
class seshat.apps.core.forms.CitationForm

Bases: django.forms.ModelForm

Form for adding or updating a new citation in the database.

class Meta
Noindex:

fields = ('ref', 'page_from', 'page_to')
labels
model
widgets
clean()

Check if the citation is a duplicate.

Returns:

The cleaned data.

Return type:

dict

Raises:

ValidationError – If the citation is a duplicate.

class seshat.apps.core.forms.NgaForm

Bases: django.forms.ModelForm

Form for adding or updating a new NGA in the database.

class Meta
Noindex:

fields = ('name', 'world_region', 'subregion', 'fao_country')
labels
model
widgets
class seshat.apps.core.forms.PolityForm

Bases: django.forms.ModelForm

Form for adding or updating a new polity in the database.

class Meta
Noindex:

fields = ('name', 'new_name', 'long_name', 'start_year', 'end_year', 'home_seshat_region', 'polity_tag',...
labels
model
widgets
class seshat.apps.core.forms.PolityUpdateForm

Bases: django.forms.ModelForm

Form for adding or updating an existing polity in the database.

class Meta
Noindex:

fields = ('name', 'new_name', 'long_name', 'start_year', 'end_year', 'home_seshat_region', 'polity_tag',...
labels
model
widgets
class seshat.apps.core.forms.ReferenceForm

Bases: django.forms.ModelForm

Form for adding or updating a new reference in the database.

class Meta
Noindex:

fields = ('title', 'year', 'creator', 'zotero_link', 'long_name')
labels
model
widgets
class seshat.apps.core.forms.ReferenceWithPageForm(*args, **kwargs)

Bases: django.forms.Form

Form for adding or updating a new reference with page numbers in the database.

helper
page_from
page_to
parent_pars
ref
class seshat.apps.core.forms.ReferenceWithPageForm_UPGRADE(*args, **kwargs)

Bases: django.forms.Form

helper
page_from
page_to
parent_pars
ref
class seshat.apps.core.forms.ReligionForm

Bases: django.forms.ModelForm

Form for adding or updating a new religion in the database.

class Meta
Noindex:

fields = ['religion_name']
model
widgets
class seshat.apps.core.forms.SeshatCommentForm

Bases: django.forms.ModelForm

Form for adding or updating a new comment in the database.

class Meta
Noindex:

fields = ('text',)
labels
model
widgets
class seshat.apps.core.forms.SeshatCommentForm2

Bases: django.forms.Form

formset
class seshat.apps.core.forms.SeshatCommentPartForm

Bases: django.forms.ModelForm

Form for adding or updating a new comment part in the database.

class Meta
Noindex:

fields = ('comment', 'comment_part_text', 'comment_citations', 'comment_order', 'comment_curator')
labels
model
widgets
class seshat.apps.core.forms.SeshatCommentPartForm10

Bases: django.forms.Form

comment_order
comment_text
formset
class seshat.apps.core.forms.SeshatCommentPartForm2

Bases: django.forms.Form

comment_order
comment_text
formset
class seshat.apps.core.forms.SeshatCommentPartForm2_UPGRADE

Bases: django.forms.Form

comment_order
comment_text
references_formset
class seshat.apps.core.forms.SeshatCommentPartForm5

Bases: django.forms.Form

comment_order
comment_text
formset
class seshat.apps.core.forms.SeshatPrivateCommentForm

Bases: django.forms.ModelForm

Form for adding or updating a new private comment in the database.

class Meta
Noindex:

fields = ('text',)
labels
model
widgets
class seshat.apps.core.forms.SeshatPrivateCommentPartForm

Bases: django.forms.ModelForm

Form for adding or updating a new private comment part in the database.

class Meta
Noindex:

fields = ('private_comment', 'private_comment_part_text', 'private_comment_owner', 'private_comment_reader')
labels
model
widgets
class seshat.apps.core.forms.SignUpForm

Bases: django.contrib.auth.forms.UserCreationForm

class Meta
Noindex:

fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', 'captcha')
model
widgets
clean_email()
captcha
password1
password2
class seshat.apps.core.forms.VariablehierarchyFormNew

Bases: django.forms.Form

class Meta
Noindex:

unique_together = ('variable_name', 'section_name', 'subsection_name')
is_verified
my_vars
my_vars_tuple = [('', ' -- Select Variable -- ')]
section_name
subsection_name
variable_name
seshat.apps.core.forms.CommentPartFormSet
seshat.apps.core.forms.ReferenceFormSet10
seshat.apps.core.forms.ReferenceFormSet2
seshat.apps.core.forms.ReferenceFormSet2_UPGRADE
seshat.apps.core.forms.ReferenceFormSet5