posts package

Module Overview:

Post: Modelo que guarda el contenido que se distribuirá al usuario a través del chatbot.

Interaction: Modelo que guarda distintas acciones que puede tener un usuario del chatbot asociadas o no a un post.

Feedback: Modelo que guarda las calificaciones que un usuario del chatbot le da a un bot.

Label: Modelo que guarda las distintas categorías que puede tener un post.

Question: Modelo que guarda las distintas preguntas que puede recibir un usuario del bot, asociadas a un post, a través de un servicio REST.

Response: Modelo que guarda las distintas respuestas que un usuario dio a determinada question.

Review: Modelo que guarda la revisión de un post, para su aprobación o denegación.

UserReviewRole: Modelo que guarda el rol que cumple un usuario dentro de una review. (Autor o revisor).

Approbation: Modelo que guarda la aprobación de un post a través de un review, y el usuario que aprobó el post.

Rejection: Modelo que guarda la denegación de un post a través de un review, el usuario que denegó el post y un mensaje del porqué.

ReviewComment: Modelo que guarda comentarios hechos por un usuario sobre un review.

QuestionResponse: Modelo que guarda distintas respuestas con valor puntuado para una question.

Submodules

posts.admin module

posts.apps module

class posts.apps.PostsConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

name = 'posts'

posts.forms module

class posts.forms.CreatePostForm(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, field_order=None, use_required_attribute=None, renderer=None)

Bases: django.forms.forms.Form

TYPE_CHOICES = (('embeded', 'Embeded'), ('youtube', 'Youtube'))
base_fields = {'area_id': <django.forms.fields.IntegerField object>, 'content': <django.forms.fields.CharField object>, 'content_activity': <django.forms.fields.CharField object>, 'max_range': <django.forms.fields.IntegerField object>, 'min_range': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'new': <django.forms.fields.BooleanField object>, 'preview': <django.forms.fields.CharField object>, 'thumbnail': <django.forms.fields.CharField object>, 'type': <django.forms.fields.ChoiceField object>}
declared_fields = {'area_id': <django.forms.fields.IntegerField object>, 'content': <django.forms.fields.CharField object>, 'content_activity': <django.forms.fields.CharField object>, 'max_range': <django.forms.fields.IntegerField object>, 'min_range': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'new': <django.forms.fields.BooleanField object>, 'preview': <django.forms.fields.CharField object>, 'thumbnail': <django.forms.fields.CharField object>, 'type': <django.forms.fields.ChoiceField object>}
property media
class posts.forms.QuestionForm(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

class Meta

Bases: object

fields = ('name', 'post', 'replies')
model

alias of posts.models.Question

base_fields = {'name': <django.forms.fields.CharField object>, 'post': <django.forms.models.ModelChoiceField object>, 'replies': <django.forms.fields.CharField object>}
declared_fields = {}
property media
class posts.forms.QuestionResponseForm(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

class Meta

Bases: object

fields = ('response', 'value')
model

alias of posts.models.QuestionResponse

base_fields = {'response': <django.forms.fields.CharField object>, 'value': <django.forms.fields.TypedChoiceField object>}
declared_fields = {}
property media
class posts.forms.ReviewCommentForm(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

class Meta

Bases: object

fields = ('comment',)
model

alias of posts.models.ReviewComment

base_fields = {'comment': <django.forms.fields.CharField object>}
declared_fields = {}
property media
class posts.forms.UpdatePostFormModel(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

class Meta

Bases: object

fields = ['name', 'content', 'type', 'min_range', 'max_range', 'area_id', 'preview']
model

alias of posts.models.Post

base_fields = {'area_id': <django.forms.fields.IntegerField object>, 'content': <django.forms.fields.CharField object>, 'max_range': <django.forms.fields.IntegerField object>, 'min_range': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'preview': <django.forms.fields.CharField object>, 'type': <django.forms.fields.TypedChoiceField object>}
declared_fields = {}
property media
class posts.forms.UpdateTaxonomy(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

class Meta

Bases: object

fields = ['post', 'area', 'subarea', 'component']
model

alias of posts.models.Taxonomy

base_fields = {'area': <django.forms.models.ModelChoiceField object>, 'component': <django.forms.models.ModelChoiceField object>, 'post': <django.forms.models.ModelChoiceField object>, 'subarea': <django.forms.models.ModelChoiceField object>}
declared_fields = {}
property media

posts.models module

class posts.models.Approbation(id, user, review)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

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>
review

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.

review_id

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

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

class posts.models.Area(id, name)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_id_display(*, field=<django.db.models.fields.CharField: id>)
id

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>
taxonomy_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.

class posts.models.Componente(id, name)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_id_display(*, field=<django.db.models.fields.CharField: id>)
id

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>
taxonomy_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.

class posts.models.Feedback(*args, **kwargs)

Bases: django.db.models.base.Model

Parameters
  • post – Post que recibe la calificación del usuario.

  • user_id – ID del usuario del bot asociado a la interaction.

  • username – Username del usuario del bot asociado a la interaction (Redundancia que se utiliza para ciertos reportes).

  • channel_id – channel id del usuario del bot.

  • bot_id – Bot al cual está conectado el usuario.

  • Value – Valor de tipo entero que el usuario del bot le dio al post.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

bot_id

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

channel_id

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

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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>
post

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.

post_id

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

updated_at

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

user_id

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

username

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

value

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

class posts.models.Interaction(*args, **kwargs)

Bases: django.db.models.base.Model

Tracking the user interaction with content (or general interaction with the system).

Parameters
  • post – Post asociado a la interacción. (Puede ser nulo, acciones como “iniciar sesión” no van asociadas a ningún post. Acciones como calificar si).

  • user_id – ID del usuario del bot asociado a la interaction.

  • username – Username del usuario del bot asociado a la interaction (Redundancia que se utiliza para ciertos reportes).

  • channel_id – channel id del usuario del bot.

  • bot_id – Bot al cual está conectado el usuario.

  • type – String que guarda el tipo de interaction que ejecutó el usuario, estas pueden ser de cualquier tipo. De uso cotidiano en la plataforma en ciertas cosas se encuentran ‘session’ y ‘opened’, su uso puede ser muy variado.

  • value – Valor de tipo Entero que puede almacenarse en las interacciones. (Formato de Entero posiblemente temporal, guardado así por alguna necesidad, por revisar)

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

>>> Interaction(1,1,"user",1.1)
<Interaction: >
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

bot_id

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

channel_id

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

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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>
post

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.

post_id

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

type

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

updated_at

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

user_id

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

username

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

value

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

class posts.models.Label(*args, **kwargs)

Bases: django.db.models.base.Model

Parameters
  • name – Nombre de la categoría

  • posts – Referencia de muchos a muchos con el modelo Posts.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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.

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>
posts

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

updated_at

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

class posts.models.MessengerUserCommentPost(id, user_id, post, comment, created_at, updated_at)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

comment

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

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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>
post

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.

post_id

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

updated_at

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

user_id

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

class posts.models.Post(*args, **kwargs)

Bases: django.db.models.base.Model

Post Model

Post has some properties related to a post on a web, a generic container for content in Afinidata.

Parameters
  • name – Nombre del post.

  • status – Puede ser: draft, review, rejected, need_changes, published. Donde “draft” representa que aún está en borrador, “review” que se encuentra en revisión, “rejected” que ha sido rechazado, “need_changes” que hay cambios por realizar y “published”, que representa que el servicio que distribuye los posts lo tomará en cuenta.

  • type – Puede ser: embeded, youtube. Donde embeded muestra en un iframe que ocupa toda la pantalla el contenido de un link, y youtube muestra un vídeo de youtube a través de su ID. (Próximo paso, un editor WYSIWYG y un type extra llamado “content”).

  • content – Dependiendo del type, debería ser un link en el type “embeded”, y el ID del vídeo de Youtube en el type “youtube”. (Próximo paso, contenido resultante del editor WYSIWYG en el type “content”).

  • content_activity – Contenido que es enviado al usuario del bot cuando este por problemas de conexión no puede ver el enlace o el vídeo del post. Se utiliza este signo “|” para delimitar el contenido de cada mensaje a través del chatbot.

  • user – Usuario creador del post.

  • min_range – El servicio que devuelve actividades se basa en un value para devolver un post dentro del rango, si value es mayor a este atributo el post es candidato para ser enviado.

  • max_range – El servicio que devuelve actividades se basa en un value para devolver un post dentro del rango, si value es menor a este atributo el post es candidato para ser enviado.

  • preview – El servicio que devuelve actividades, devuelve un pequeño resumen de qué trata esta actividad para llamar la atención del usuario, es este atributo.

  • new (Por eliminar) – Delimitaba en cierta fecha si el servicio debía de tomar en cuenta el post para enviarse a usuarios.

  • thumbnail – El servicio que devuelve actividades, devuelve una imagen relacionada a la actividad. La url de la imagen debe guardarse en este atributo.

  • area_id (Para uso próximo) – En idea, guarda el id del área al que pertenecen (Áreas basadas en el proyecto Core (cognitivo, motor, emocional)). Para que el servicio basado en el área solicitada devuelva únicamente posts de esa área. Por defecto se están solicitando a través del chatbot únicamente posts con área 1, mismo valor que se está guardando automáticamente en el modelo.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

area_id

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.

content_activity

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

created_at

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

feedback_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.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
id

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

interaction_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.

label_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

max_range

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

messengerusercommentpost_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.

min_range

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.

new

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>
postcomplexity_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.

preview

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

question_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.

review_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.

status

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

taxonomy

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

thumbnail

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

type

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

updated_at

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

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

class posts.models.PostComplexity(id, post, user_id, months, created_at, complexity)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

complexity

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

created_at

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

months

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>
post

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.

post_id

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

user_id

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

class posts.models.Question(*args, **kwargs)

Bases: django.db.models.base.Model

Question:

Parameters
  • name – Texto de pregunta que le llega al usuario (si se solicita a través de un servicio).

  • Post – Referencia al post que pertenece esa pregunta.

  • Replies (Por eliminar) – Casilla de texto que guardaba las posibles respuestas a una pregunta.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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.

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>
post

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.

post_id

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

questionresponse_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.

replies

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

response_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.

updated_at

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

class posts.models.QuestionResponse(id, question, response, value)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_value_display(*, field=<django.db.models.fields.IntegerField: value>)
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>
question

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.

question_id

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

response

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

value

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

class posts.models.Rejection(id, user, review, comment)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

comment

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.

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

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.

review_id

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

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

class posts.models.Response(*args, **kwargs)

Bases: django.db.models.base.Model

Response:

Parameters
  • question – Referencia a la question respondida.

  • user_id – ID del usuario del bot que respondió a la pregunta.

  • username – Username del usuario del bot que respondió la pregunta.

  • response – Respuesta del usuario a la pregunta.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, 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>
question

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.

question_id

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

response

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

response_text

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

response_value

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

updated_at

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

user_id

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

username

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

class posts.models.Review(*args, **kwargs)

Bases: django.db.models.base.Model

Review:

Parameters
  • post – Post por revisar

  • status – Estado del review. Puede ser: pending, completed.

  • comment – Casilla que permite que el creador del post deje un comentario para el revisor sobre su post.

  • users – Usuarios vinculados a esta Revisión. (Author y Revisor) a través del modelo UserReviewRole.

  • updated_at (created_at,) – (Uso general, fecha de creación, fecha de última actualización).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

approbation_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.

comment

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

created_at

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_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
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>
post

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.

post_id

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

rejection_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.

reviewcomment_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.

status

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

updated_at

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

userreviewrole_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.

users

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

class posts.models.ReviewComment(id, user, review, comment)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

comment

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.

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

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.

review_id

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

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

class posts.models.Subarea(id, name)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_id_display(*, field=<django.db.models.fields.CharField: id>)
id

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>
taxonomy_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.

class posts.models.Taxonomy(id, post, area, subarea, component)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

area

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.

area_id

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

component

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.

component_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.

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

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.

post_id

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

subarea

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.

subarea_id

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

class posts.models.Tip(id, title, min_range, max_range, topic, tip)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

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

max_range

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

min_range

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>
slug()
tip

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

title

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

topic

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

class posts.models.TipSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)

Bases: rest_framework.serializers.ModelSerializer

class Meta

Bases: object

model

alias of Tip

class posts.models.UserReviewRole(id, user, role, review)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_role_display(*, field=<django.db.models.fields.CharField: role>)
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>
review

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.

review_id

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

role

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

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

posts.routers module

class posts.routers.PostsRouter

Bases: object

allow_migrate(db, app_label, model_name=None, **hints)
allow_relation(obj1, obj2, **hints)
db_for_read(model, **hints)
db_for_write(model, **hints)

posts.tests module

posts.urls module

posts.urls.path(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)

posts.views module

class posts.views.AcceptReviewView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.View

get(request, *args, **kwargs)
login_url = '/login/'
redirect_field_name = 'redirect_to'
class posts.views.AddCommentToPostByUserView(**kwargs)

Bases: django.views.generic.edit.CreateView

dispatch(request, *args, **kwargs)
fields = ('post', 'user_id', 'comment')
form_invalid(form)

If the form is invalid, render the invalid form.

form_valid(form)

If the form is valid, save the associated model.

get(*args, **kwargs)

Handle GET requests: instantiate a blank version of the form.

model

alias of posts.models.MessengerUserCommentPost

class posts.views.AddReviewCommentView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

fields = ('comment',)
form_valid(form)

If the form is valid, save the associated model.

login_url = '/login/'
model

alias of posts.models.ReviewComment

redirect_field_name = 'redirect_to'
class posts.views.ChangePostStatusToReviewView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

context_object_name = 'review'
fields = ('comment',)
form_valid(form)

If the form is valid, save the associated model.

get_context_data(**kwargs)

Insert the form into the context dict.

login_url = '/login/'
model

alias of posts.models.Review

redirect_field_name = 'redirect_to'
template_name = 'posts/new-review.html'
class posts.views.ChangePostToNeedChangesView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.View

get(request, *args, **kwargs)
login_url = '/login/'
redirect_field_name = 'redirect_to'
class posts.views.CreateQuestion(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

fields = ('name', 'post', 'replies')
form_valid(form)

If the form is valid, save the associated model.

login_url = '/login/'
model

alias of posts.models.Question

redirect_field_name = 'redirect_to'
template_name = 'posts/new-question.html'
class posts.views.CreateQuestionResponseView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

fields = ('response', 'value')
form_valid(form)

If the form is valid, save the associated model.

login_url = '/login/'
model

alias of posts.models.QuestionResponse

post(request, *args, **kwargs)

Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.

redirect_field_name = 'redirect_to'
class posts.views.DeletePostView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

context_object_name = 'post'
login_url = '/login/'
model

alias of posts.models.Post

pk_url_kwarg = 'id'
redirect_field_name = 'redirect_to'
success_url = '/posts/'
template_name = 'posts/delete.html'
class posts.views.DeleteQuestionResponseView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

context_object_name = 'response'
get_context_data(**kwargs)

Insert the single object into the context dict.

get_success_url()
login_url = '/login/'
model

alias of posts.models.QuestionResponse

pk_url_kwarg = 'response_id'
redirect_field_name = 'redirect_to'
success_url = '/posts/'
template_name = 'posts/delete-question-response.html'
class posts.views.DeleteQuestionView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

context_object_name = 'question'
get_success_url()
login_url = '/login/'
model

alias of posts.models.Question

pk_url_kwarg = 'id'
redirect_field_name = 'redirect_to'
template_name = 'posts/question-delete.html'
class posts.views.EditPostView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.UpdateView

context_object_name = 'post'
fields = ('name', 'thumbnail', 'new', 'min_range', 'max_range', 'content', 'content_activity', 'preview')
form_valid(form)

If the form is valid, save the associated model.

get_context_data(**kwargs)

Insert the form into the context dict.

login_url = '/login/'
model

alias of posts.models.Post

pk_url_kwarg = 'id'
redirect_field_name = 'redirect_to'
template_name = 'posts/edit.html'
class posts.views.EditQuestion(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.UpdateView

context_object_name = 'question'
fields = ('name', 'post', 'replies')
form_valid(form)

If the form is valid, save the associated model.

get_context_data(**kwargs)

Insert the form into the context dict.

login_url = '/login/'
model

alias of posts.models.Question

pk_url_kwarg = 'id'
redirect_field_name = 'redirect_to'
template_name = 'posts/question-edit.html'
class posts.views.EditQuestionResponseView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.UpdateView

fields = ('response', 'value')
form_valid(form)

If the form is valid, save the associated model.

get(*args, **kwargs)

Handle GET requests: instantiate a blank version of the form.

get_context_data(*args, **kwargs)

Insert the form into the context dict.

login_url = '/login/'
model

alias of posts.models.QuestionResponse

pk_url_kwarg = 'response_id'
redirect_field_name = 'redirect_to'
template_name = 'posts/edit-question-response.html'
class posts.views.HomeView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

context_object_name = 'posts'
get_context_data(**kwargs)

Get the context for this view.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

login_url = '/login/'
model

alias of posts.models.Post

paginate_by = 30
redirect_field_name = 'redirect_to'
template_name = 'posts/index.html'
class posts.views.NewPostView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

fields = ('name', 'thumbnail', 'new', 'min_range', 'max_range', 'content', 'content_activity', 'preview')
form_valid(form)

If the form is valid, save the associated model.

login_url = '/login/'
model

alias of posts.models.Post

redirect_field_name = 'redirect_to'
template_name = 'posts/new.html'
class posts.views.PostComplexityCreateApiView(**kwargs)

Bases: rest_framework.generics.CreateAPIView

serializer_class

alias of posts.serializers.PostComplexitySerializer

class posts.views.PostsListView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.TemplateView

get_context_data(*args, **kwargs)
login_url = '/login/'
redirect_field_name = 'redirect_to'
template_name = 'posts/list.html'
class posts.views.QuestionView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.DetailView

context_object_name = 'question'
login_url = '/login/'
model

alias of posts.models.Question

pk_url_kwarg = 'id'
redirect_field_name = 'redirect_to'
template_name = 'posts/question.html'
class posts.views.QuestionsView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.TemplateView

get_context_data(**kwargs)
login_url = '/login/'
redirect_field_name = 'redirect_to'
template_name = 'posts/questions.html'
class posts.views.RejectionView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.CreateView

context_object_name = 'rejection'
fields = ('comment',)
form_valid(form)

If the form is valid, save the associated model.

get_context_data(**kwargs)

Insert the form into the context dict.

login_url = '/login/'
model

alias of posts.models.Rejection

redirect_field_name = 'redirect_to'
template_name = 'posts/new-rejection.html'
class posts.views.ReviewPostView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.DetailView

context_object_name = 'review'
login_url = '/login/'
model

alias of posts.models.Post

pk_url_kwarg = 'pid'
redirect_field_name = 'redirect_to'
template_name = 'posts/review.html'
class posts.views.ReviewView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.DetailView

context_object_name = 'review'
get_context_data(**kwargs)

Insert the single object into the context dict.

get_object(queryset=None)

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

login_url = '/login/'
model

alias of posts.models.Review

pk_url_kwarg = 'review_id'
redirect_field_name = 'redirect_to'
template_name = 'posts/review-detail.html'
class posts.views.Reviews(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

context_object_name = 'reviews'
get_context_data(**kwargs)

Get the context for this view.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

login_url = '/login/'
model

alias of posts.models.Review

paginate_by = 10
redirect_field_name = 'redirect_to'
template_name = 'posts/reviser-reviews.html'
class posts.views.StatisticsView(**kwargs)

Bases: django.views.generic.base.TemplateView

get_context_data(**kwargs)
template_name = 'posts/statistics.html'
class posts.views.TipsViewSet(**kwargs)

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows tips to be viewed or edited.

basename = None
description = None
detail = None
name = None
queryset
serializer_class

alias of posts.models.TipSerializer

suffix = None
posts.views.create_response_for_question(request, id)
posts.views.create_tag(request)
posts.views.edit_interaction(request, id)
posts.views.feedback(request)
posts.views.fetch_post(request, id)
posts.views.get_posts_for_user(request)
posts.views.get_replies_to_question(request, id)
posts.views.get_tags_for_post(request, id)
posts.views.get_thumbnail_by_post(request, id)
posts.views.getting_posts_reco(request)
posts.views.post_activity(request, id)
posts.views.question_by_post(request, id)
posts.views.remove_tag_for_post(request, id)
posts.views.set_interaction(request)
posts.views.set_tag_to_post(request, id)
posts.views.set_taxonomy(request)
posts.views.tags(request)

Module contents