task package

Subpackages

Submodules

task.forms module

class task.forms.ProjectForm(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, renderer=None)

Bases: django.forms.models.ModelForm

Form For Projects Object

class Meta

Bases: object

fields = ('title',)
model

alias of task.models.Project

widgets = {'title': <django.forms.widgets.TextInput object>}
base_fields = {'title': <django.forms.fields.CharField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

class task.forms.TaskForm(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, renderer=None)

Bases: django.forms.models.ModelForm

Form for Tasj Object

class Meta

Bases: object

fields = ('title', 'description', 'deadline')
model

alias of task.models.Task

widgets = {'deadline': <django.forms.widgets.DateTimeInput object>, 'description': <django.forms.widgets.Textarea object>, 'title': <django.forms.widgets.TextInput object>}
base_fields = {'deadline': <django.forms.fields.DateTimeField object>, 'description': <django.forms.fields.CharField object>, 'title': <django.forms.fields.CharField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

task.models module

class task.models.Notification(*args, **kwargs)

Bases: django.db.models.base.Model

Information About Nitofication

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

actived

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

content

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

creationDate

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_creationDate(*, field=<django.db.models.fields.DateTimeField: creationDate>, is_next=True, **kwargs)
get_previous_by_creationDate(*, field=<django.db.models.fields.DateTimeField: creationDate>, 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.

objects = <django.db.models.manager.Manager object>
task

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.

task_id
class task.models.Project(*args, **kwargs)

Bases: django.db.models.base.Model

Information about Project

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

creationDate

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_creationDate(*, field=<django.db.models.fields.DateField: creationDate>, is_next=True, **kwargs)
get_previous_by_creationDate(*, field=<django.db.models.fields.DateField: creationDate>, 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.

objects = <django.db.models.manager.Manager object>
task_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.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

title

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

user

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.

user_id
class task.models.Task(*args, **kwargs)

Bases: django.db.models.base.Model

Information About Task

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

completed_day

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

creationDate

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

deadline

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

description

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

done

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_completed_day(*, field=<django.db.models.fields.DateTimeField: completed_day>, is_next=True, **kwargs)
get_next_by_creationDate(*, field=<django.db.models.fields.DateField: creationDate>, is_next=True, **kwargs)
get_next_by_deadline(*, field=<django.db.models.fields.DateTimeField: deadline>, is_next=True, **kwargs)
get_previous_by_completed_day(*, field=<django.db.models.fields.DateTimeField: completed_day>, is_next=False, **kwargs)
get_previous_by_creationDate(*, field=<django.db.models.fields.DateField: creationDate>, is_next=False, **kwargs)
get_previous_by_deadline(*, field=<django.db.models.fields.DateTimeField: deadline>, 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.

noti

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

notification_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.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
project

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.

project_id
title

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

task.views module

task.views.Delete_Project(request, id)

Delete a Project by Id

Parameters
  • request

  • id – project id

Returns

if projects with id is exist, then delete it and redirect to main page, else raise error

task.views.Delete_Task(request, id)

Delete a Task from Project

Parameters
  • request – request from user

  • id – Task id

Returns

if Task is exist, delete it and redirect to project page, else raise error

task.views.Done_Task(request, id)

Make Task as Done

Parameters
  • request – request from user

  • id – Task id

Returns

make task as done and direct back to project page

class task.views.MyProject(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, rest_framework.views.APIView

Infor about Object PRoject

get(request, id)

Get Method Show all Task in Projects

Parameters
  • request – GET request from user

  • id – id of Project

Returns

tasks and these notifications

post(request, id)

POST method Create a new Task into this project

Parameters
  • request – POST request from user

  • id – id of project

Returns

New Task is create if form data is Valid, then redirect bach to Project Page

class task.views.MyProjects(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, rest_framework.views.APIView

Infor about MyProjects Objects (Cout From TZ)

get(request, str='id')

GET Method for model MyProjects Show all Projects of a user

Parameters
  • request – GET request from user

  • str – sorting order

Returns

sorted list of all Projects,

login_url = '/login/'
post(request)

POST method for model MyProjects Create a new project

Parameters

request – POST request from user

Returns

a Project Object is created if form data is valid and then redirect to main page

redirect_field_name = 'redirect_to'
task.views.Save_Task(request, id)

POST Method for model Task Update Information for Task

Parameters
  • request – POST request from user

  • id – Task id

Returns

if task is exit, update task information with valid data, if task didnt found, raise error

task.views.make_noti(request)

Create notifications for all projects :param request: get request from user :return: number of notifications

Module contents