senate package¶
Subpackages¶
Submodules¶
senate.admin module¶
-
class
senate.admin.CategoryAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ['name', 'department']¶
-
list_filter= ['department']¶
-
media¶
-
-
class
senate.admin.DepartmentAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ['name', 'group', 'head']¶
-
media¶
-
readonly_fields= ['members']¶
-
-
class
senate.admin.EmployeeAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ['person', 'department', 'position', 'phone', 'public', 'importance']¶
-
list_editable= ['public', 'importance']¶
-
list_filter= ['department', 'public']¶
-
media¶
-
search_fields= ['person__first_name', 'person__last_name']¶
-
-
class
senate.admin.EventInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.StackedInline-
can_delete= True¶
-
media¶
-
model¶ alias of
Event
-
readonly_fields= ['images_tags']¶
-
-
class
senate.admin.IssueAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
inlines= [<class 'senate.admin.EventInline'>]¶
-
list_display= ['category', 'name', 'author', 'status', 'add_dttm', 'last_event', 'want_to_help', 'assigned_dept']¶
-
list_filter= ['category', 'status', 'want_to_help', 'assigned_dept']¶
-
media¶
-
senate.app module¶
senate.forms module¶
-
class
senate.forms.DeptEventCreateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ['cls', 'info', 'new_status', 'new_dept']¶
-
model¶ alias of
Event
-
widgets= {'info': <class 'django.forms.widgets.Textarea'>}¶
-
-
base_fields= OrderedDict([('cls', <django.forms.fields.TypedChoiceField object>), ('info', <django.forms.fields.CharField object>), ('new_status', <django.forms.fields.TypedChoiceField object>), ('new_dept', <django.forms.models.ModelChoiceField object>), ('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
declared_fields= OrderedDict([('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
media¶
-
class
-
class
senate.forms.IssueCreateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ['name', 'category', 'want_to_help']¶
-
model¶ alias of
Issue
-
-
base_fields= OrderedDict([('name', <django.forms.fields.CharField object>), ('category', <django.forms.models.ModelChoiceField object>), ('want_to_help', <django.forms.fields.BooleanField object>), ('issue_descr', <django.forms.fields.CharField object>), ('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
declared_fields= OrderedDict([('issue_descr', <django.forms.fields.CharField object>), ('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
media¶
-
class
-
class
senate.forms.UserEventCreateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ['info']¶
-
model¶ alias of
Event
-
widgets= {'info': <class 'django.forms.widgets.Textarea'>}¶
-
-
base_fields= OrderedDict([('info', <django.forms.fields.CharField object>), ('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
declared_fields= OrderedDict([('photo1', <django.forms.fields.ImageField object>), ('photo2', <django.forms.fields.ImageField object>), ('photo3', <django.forms.fields.ImageField object>)])¶
-
media¶
-
class
senate.models module¶
-
class
senate.models.Category(id, name, department, public)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
department¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
department_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
issue_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
name¶ 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>¶
-
public¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
senate.models.Department(id, group, name, head)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
employee_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
group¶ 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.placeis aForwardOneToOneDescriptorinstance.
-
group_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
head¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
head_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
members¶
-
name¶ 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>¶
-
exception
-
class
senate.models.Employee(id, person, position, department, public, phone, importance)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
department¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
department_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
importance¶ 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>¶
-
person¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
person_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
phone¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
position¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
public¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
senate.models.Event(id, issue, author, add_dttm, cls, info, new_dept, new_worker, new_status)[source]¶ Bases:
django.db.models.base.Model-
ASSIGNEE_CHANGE= 2¶
-
CLASS= ((1, 'Обновление'), (2, 'Смена ответственного'), (3, 'Изменение статуса'), (4, 'Запрос сведений'), (5, 'Создание обращения'))¶
-
DETAILS_REQUEST= 4¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
MAX_INFO_LEN= 2048¶
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
OPEN= 5¶
-
STATUS_CHANGE= 3¶
-
UPDATE= 1¶
-
add_dttm¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
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.parentis aForwardManyToOneDescriptorinstance.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cls¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eventdocument_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_cls_display(*moreargs, **morekwargs)¶
-
get_new_status_display(*moreargs, **morekwargs)¶
-
get_next_by_add_dttm(*moreargs, **morekwargs)¶
-
get_previous_by_add_dttm(*moreargs, **morekwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
info¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
issue¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
issue_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
new_dept¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
new_dept_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
new_status¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
new_worker¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
new_worker_id¶ 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>¶
-
-
class
senate.models.EventDocument(id, file, event)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
event¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
event_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
file¶ Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
-
id¶ 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>¶
-
exception
-
class
senate.models.Issue(id, author, category, name, status, add_dttm, last_event, close_dttm, want_to_help, assigned_dept, assigned_worker)[source]¶ Bases:
django.db.models.base.Model-
ACCEPTED= 3¶
-
CLOSED= 2¶
-
DECLINED= 4¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
OPEN= 1¶
-
STATUS= ((1, 'Открыто'), (2, 'Закрыто'), (3, 'Инициатива одобрена'), (4, 'Инициатива отклонена'))¶
-
add_dttm¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
assigned_dept¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
assigned_dept_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
assigned_worker¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
assigned_worker_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
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.parentis aForwardManyToOneDescriptorinstance.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
category¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
category_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
close_dttm¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
event_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_next_by_add_dttm(*moreargs, **morekwargs)¶
-
get_previous_by_add_dttm(*moreargs, **morekwargs)¶
-
get_status_display(*moreargs, **morekwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_event¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ 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>¶
-
status¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
want_to_help¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
senate.signals module¶
senate.tests module¶
senate.urls module¶
senate.views module¶
-
class
senate.views.DeptIssueList(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin,django.views.generic.list.ListView-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Issue
-
template_name= 'senate/issue_list.html'¶
-
-
class
senate.views.EmployeeList(**kwargs)[source]¶ Bases:
django.views.generic.list.ListView-
model¶ alias of
Employee
-
ordering= ['-importance', 'department', 'position']¶
-
-
class
senate.views.FullIssueList(**kwargs)[source]¶ Bases:
django.views.generic.list.ListView-
model¶ alias of
Issue
-
template_name= 'senate/issue_list.html'¶
-
-
class
senate.views.IssueCreate(**kwargs)[source]¶ Bases:
django.views.generic.edit.CreateView-
dispatch(request, *args, **kwargs)¶
-
form_class¶ alias of
IssueCreateForm
-
model¶ alias of
Issue
-
-
class
senate.views.IssueDisplay(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Issue
-
-
class
senate.views.MyIssueList(**kwargs)[source]¶ Bases:
django.views.generic.list.ListView-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Issue
-
template_name= 'senate/issue_list.html'¶
-