eucrim.treaty package

Submodules

eucrim.treaty.apps module

class eucrim.treaty.apps.TreatyConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'eucrim.treaty'

eucrim.treaty.models module

class eucrim.treaty.models.Ratification(*args, **kwargs)[source]

Bases: Model

ACCESSION = 'A'
ENTRY_INTO_FORCE = 'E'
LEGAL_ACT_CHOICES = (('S', 'Signature'), ('R', 'Ratification'), ('A', 'Accession'), ('E', 'Entry into Force'))
class Meta[source]

Bases: object

abstract = False
ordering = ['-date_signed']
RATIFICATION = 'R'
SIGNATURE = 'S'
country

A descriptor for country fields on a model instance. Returns a Country when accessed so you can do things like:

>>> from people import Person
>>> person = Person.object.get(name='Chris')

>>> person.country.name
'New Zealand'

>>> person.country.flag
'/static/flags/nz.gif'
date_signed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_country_display(*, field=<django_countries.fields.CountryField: country>)
get_next_by_date_signed(*, field=<django.db.models.fields.DateField: date_signed>, is_next=True, **kwargs)
get_previous_by_date_signed(*, field=<django.db.models.fields.DateField: date_signed>, is_next=False, **kwargs)
legal_act

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects
panels = [<FieldPanel 'country' with model=None>, <FieldPanel 'date_signed' with model=None>, <FieldPanel 'legal_act' with model=None>]
class eucrim.treaty.models.RatificationManager(*args, **kwargs)[source]

Bases: Manager

Custom manager for Ratifications

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

class eucrim.treaty.models.TreatyCountries[source]

Bases: Countries

override = {'CZ': 'Czech Republic', 'EU': 'European Union'}
class eucrim.treaty.models.TreatyIndexPage(id, path, depth, numchild, translation_key, locale, latest_revision, live, has_unpublished_changes, first_published_at, last_published_at, live_revision, go_live_at, expire_at, expired, locked, locked_at, locked_by, title, draft_title, slug, content_type, url_path, owner, seo_title, show_in_menus, search_description, latest_revision_created_at, alias_of, page_ptr, intro, legend)[source]

Bases: HideShowInMenusField, RoutablePageMixin, Page

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: NotUpdated

ajax_template = None
content_panels = [<wagtail.models.panels.PanelPlaceholder object>, <FieldPanel 'intro' with model=None>, <FieldPanel 'legend' with model=None>]
default(request)[source]

View function for the default treaty index page

get_context(request, *args, **kwargs)[source]
index_entries

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

intro

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_creatable = True
legend

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

max_count = 1
page_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

page_ptr_id
parent_page_types = ['core.HomePage', 'core.StandardPage']
plain(request)[source]

View function for the plain treaty index table

qs = <PageQuerySet [<TreatyPage: Third Additional Protocol to the European Convention on Mutual Assistance in Criminal Matters>, <TreatyPage: Council of Europe Convention for the Protection of the Profession of Lawyer>, <TreatyPage: Council of Europe Framework Convention on Artificial Intelligence and Human Rights, Democracy and the Rule of Law>, <TreatyPage: Second Additional Protocol to the Convention on Cybercrime on enhanced co-operation and disclosure of electronic evidence>, <TreatyPage: Protocol amending the Convention for the Protection of Individuals with regard to Automatic Processing of Personal Data>, <TreatyPage: Protocol amending the Additional Protocol to the Convention on the Transfer of Sentenced Persons>, <TreatyPage: Council of Europe Convention on Offences relating to Cultural Property>, <TreatyPage: Council of Europe Convention on an Integrated Safety, Security and Service Approach at Football Matches and Other Sports Events>, <TreatyPage: Additional Protocol to the Council of Europe Convention on the Prevention of Terrorism>, <TreatyPage: Council of Europe Convention against Trafficking in Human Organs>, <TreatyPage: Council of Europe Convention on the Manipulation of Sports Competitions>, <TreatyPage: Protocol No. 16 to the Convention for the Protection of Human Rights and Fundamental Freedoms>, <TreatyPage: Protocol No. 15 amending the Convention for the Protection of Human Rights and Fundamental Freedoms>, <TreatyPage: Fourth Additional Protocol to the European Convention on Extradition>, <TreatyPage: Convention on the counterfeiting of medical products and similar crimes involving threats to public health>, <TreatyPage: Convention on preventing and combating violence against women and domestic violence>, <TreatyPage: Third Additional Protocol to the European Convention on Extradition>, <TreatyPage: Council of Europe Convention on the Protection of Children against Sexual Exploitation and Sexual Abuse>, <TreatyPage: Council of Europe Convention on Laundering, Search, Seizure and Confiscation of the Proceeds from Crime and on the Financing of Terrorism>, <TreatyPage: Council of Europe Convention on the Prevention of Terrorism>, '...(remaining elements truncated)...']>
show_in_menus = True
subpage_types = ['treaty.TreatyPage']
template = 'treaty/treaty_index_page.html'
class eucrim.treaty.models.TreatyPage(id, path, depth, numchild, translation_key, locale, latest_revision, live, has_unpublished_changes, first_published_at, last_published_at, live_revision, go_live_at, expire_at, expired, locked, locked_at, locked_by, title, draft_title, slug, content_type, url_path, owner, seo_title, show_in_menus, search_description, latest_revision_created_at, alias_of, page_ptr, reference)[source]

Bases: HideShowInMenusField, Page

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: NotUpdated

ajax_template = None
content_panels = [<wagtail.models.panels.PanelPlaceholder object>, <FieldPanel 'reference' with model=None>, <InlinePanel with model=None>]
get_admin_display_title()[source]

Return the title for this page as it should appear in the admin backend; override this if you wish to display extra contextual information about the page, such as language. By default, returns draft_title.

property get_ratifications_count
index_entries

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

is_creatable = True
page_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

page_ptr_id
parent_page_types = ['treaty.TreatyIndexPage']
ratifications
reference

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

show_in_menus = False
subpage_types = []
template = 'treaty/treaty_page.html'
toggle_threshold = 6
class eucrim.treaty.models.TreatyPageRatifications(id, sort_order, country, date_signed, legal_act, page)[source]

Bases: Orderable, Ratification

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

country

A descriptor for country fields on a model instance. Returns a Country when accessed so you can do things like:

>>> from people import Person
>>> person = Person.object.get(name='Chris')

>>> person.country.name
'New Zealand'

>>> person.country.flag
'/static/flags/nz.gif'
date_signed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_country_display(*, field=<django_countries.fields.CountryField: country>)
get_next_by_date_signed(*, field=<django.db.models.fields.DateField: date_signed>, is_next=True, **kwargs)
get_previous_by_date_signed(*, field=<django.db.models.fields.DateField: date_signed>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

legal_act

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

page

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

page_id
sort_order

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Module contents