Views

evileg_core.views module

class evileg_core.views.EActivityView(**kwargs)[source]

Bases: django.views.generic.base.View

activity_model = None
post(request)[source]
class evileg_core.views.EAjaxableView(**kwargs)[source]

Bases: evileg_core.mixins.EAjaxableMixin, django.views.generic.base.View

Ajaxable view

class evileg_core.views.EFilterByActivityView(**kwargs)[source]

Bases: evileg_core.views.EFilterView

activity_model = None
get_queryset(**kwargs)[source]
class evileg_core.views.EFilterDetailView(**kwargs)[source]

Bases: evileg_core.views.EFilterView, django.views.generic.detail.DetailView

get(request, *args, **kwargs)[source]
get_ajax(request, *args, **kwargs)[source]
get_object(**kwargs)[source]

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.

get_queryset(**kwargs)[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

object_pk_field_name = None
object_queryset = None
class evileg_core.views.EFilterView(**kwargs)[source]

Bases: evileg_core.views.EPaginatedView

model_filter = None
class evileg_core.views.EMarkdownView(**kwargs)[source]

Bases: django.views.generic.base.View

Markdown view for preview html content

post(request)[source]
class evileg_core.views.EPaginatedView(**kwargs)[source]

Bases: django.views.generic.base.ContextMixin, evileg_core.mixins.EPaginateMixin, evileg_core.views.EAjaxableView

by_user = False
columns_view = False
get(request, *args, **kwargs)[source]
get_ajax(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
get_queryset(**kwargs)[source]
get_user(**kwargs)[source]
model = None
paginated_by = 10
queryset = None
template_column_partials_name = 'evileg_core/partials/object_list_preview_columns.html'
template_name = None
template_partials_name = 'evileg_core/partials/object_list_preview.html'
evileg_core.views.lang(request, lang_code)[source]

Switch to selected language by link

Example:

<a href="{% url 'lang' 'en' %}">English</a>
Parameters
  • request – HTTP Request

  • lang_code – ‘en’ or ‘ru’

Returns

HTTP Response