Legal Package¶
The legal package contains the modules necessary to support the publication of legal disclaimers, user licencing and copyright information about the TerraNexus Web Application
Legal Submodules¶
The following submodules are defined by this package.
legal.admin module¶
Note
Module Details
Legal Package “admin” module
This module defines parameters and configuration for the site administration of the TerraNexus Legal Package.
Created: 7 September 2017
@author: Dr. Matthew B.J. Purss
- class legal.admin.CopyrightAdmin(model, admin_site)¶
Bases:
ModelAdmin
Note
Class Details
Copyright Administration Class.
- exclude = ['id']¶
- fieldsets = [(None, {'fields': ['legal_statement']}), (None, {'fields': ['show_record']}), ('Date information', {'classes': ['collapse'], 'fields': ['date_published']})]¶
- list_display = ['record_id', 'legal_statement', 'show_record', 'date_published']¶
- list_filter = ['date_published']¶
- property media¶
- search_fields = ['record_id', 'legal_statement']¶
- class legal.admin.DisclaimerAdmin(model, admin_site)¶
Bases:
ModelAdmin
Note
Class Details
Disclaimer Administration Class.
- fieldsets = [(None, {'fields': ['legal_statement']}), (None, {'fields': ['show_record']}), ('Date information', {'classes': ['collapse'], 'fields': ['date_published']})]¶
- list_display = ['record_id', 'legal_statement', 'show_record', 'date_published']¶
- list_filter = ['date_published']¶
- property media¶
- search_fields = ['record_id', 'legal_statement']¶
- class legal.admin.PrivacyAdmin(model, admin_site)¶
Bases:
ModelAdmin
Note
Class Details
Privacy Notice Administration Class.
- fieldsets = [(None, {'fields': ['legal_statement']}), (None, {'fields': ['show_record']}), ('Date information', {'classes': ['collapse'], 'fields': ['date_published']})]¶
- list_display = ['record_id', 'legal_statement', 'show_record', 'date_published']¶
- list_filter = ['date_published']¶
- property media¶
- search_fields = ['record_id', 'legal_statement']¶
- class legal.admin.Terms_and_ConditionsAdmin(model, admin_site)¶
Bases:
ModelAdmin
Note
Class Details
Terms and Conditions Notice Administration Class.
- fieldsets = [(None, {'fields': ['legal_statement']}), (None, {'fields': ['show_record']}), ('Date information', {'classes': ['collapse'], 'fields': ['date_published']})]¶
- list_display = ['record_id', 'legal_statement', 'show_record', 'date_published']¶
- list_filter = ['date_published']¶
- property media¶
- search_fields = ['record_id', 'legal_statement']¶
legal.apps module¶
Note
Module Details
Legal Package Application Registration module
This Class module is required to register each Django package under the main web application.
Created: 7 September 2017
@author: Dr. Matthew B.J. Purss
legal.models module¶
Note
Module Details
Legal Package Model Definition Resource
This Class module is required to configure the base “model” that supports the TerraNexus Legal declarations.
This is part of the Model View Controller (MVC) Architecture that underpins Django web applications.
For operational and security reasons the conventional “model” structure supported as standard by Django has been replaced with a mongodb version of this architecture.
This also enables management of the TerraNexus administration database in the same context as all other TerraNexus databases.
Created: 7 September 2017
@author: Dr. Matthew B.J. Purss
- class legal.models.Copyright(*args, **kwargs)¶
Bases:
Model
Note
Class Details
Copyright Declaration Class definition.
- Parameters:
id (int) – The database “id” field value.
legal_statement (string) – copyright legal statement.
date_published (dateTime-Object) – The date of publication of the legal statement.
show_record (boolean) – Flag to indicate whether or not the copyright statement should be visible.
record_id (string) – The record identifier.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- clean()¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- date_published¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, is_next=True, **kwargs)¶
- get_previous_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, 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_statement¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- record_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)¶
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- show_record¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class legal.models.Disclaimer(*args, **kwargs)¶
Bases:
Model
Note
Function Details
Disclaimer Declaration Class definition.
- Parameters:
id (int) – The database “id” field value.
legal_statement (string) – copyright legal statement.
date_published (dateTime-Object) – The date of publication of the legal statement.
show_record (boolean) – Flag to indicate whether or not the copyright statement should be visible.
record_id (string) – The record identifier.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- clean()¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- date_published¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, is_next=True, **kwargs)¶
- get_previous_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, 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_statement¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- record_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)¶
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- show_record¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class legal.models.Privacy(*args, **kwargs)¶
Bases:
Model
Note
Function Details
Privacy Declaration Class definition.
- Parameters:
id (int) – The database “id” field value.
legal_statement (string) – copyright legal statement.
date_published (dateTime-Object) – The date of publication of the legal statement.
show_record (boolean) – Flag to indicate whether or not the copyright statement should be visible.
record_id (string) – The record identifier.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- clean()¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- date_published¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, is_next=True, **kwargs)¶
- get_previous_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, 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_statement¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- record_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)¶
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- show_record¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class legal.models.Terms_and_Conditions(*args, **kwargs)¶
Bases:
Model
Note
Function Details
Terms and Conditions Declaration Class definition.
- Parameters:
id (int) – The database “id” field value.
legal_statement (string) – copyright legal statement.
date_published (dateTime-Object) – The date of publication of the legal statement.
show_record (boolean) – Flag to indicate whether or not the copyright statement should be visible.
record_id (string) – The record identifier.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- clean()¶
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- date_published¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, is_next=True, **kwargs)¶
- get_previous_by_date_published(*, field=<django.db.models.fields.DateTimeField: date_published>, 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_statement¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- record_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)¶
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- show_record¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
legal.tests module¶
legal.urls module¶
Note
Module Details
legal URL Configuration
The urlpatterns list routes URLs to views for the legal package. For more information please see: Django Documentation - urls
Created: 7 September 2017
@author: Dr. Matthew B.J. Purss
legal.views module¶
Note
Module Details
Legal “Views” module
This module prepares the views necessary to perform all tasks relevant to the TerraNexus legal package.
Created: 7 September 2017
@author: Dr. Matthew B.J. Purss
- legal.views.legal_statements(request)¶
Note
Function Details
legal_statements Page
- Parameters:
request (request-object) – The html request object.