def get_context_data(self, **kwargs): c = ArticleMixin.get_context_data(self, **kwargs) c['parent_urlpath'] = self.urlpath c['parent_article'] = self.article c['create_form'] = kwargs.pop('form', None) c['editor'] = editors.getEditor() return c
def get_context_data(self, **kwargs): c = ArticleMixin.get_context_data(self, **kwargs) c["parent_urlpath"] = self.urlpath c["parent_article"] = self.article c["create_form"] = kwargs.pop("form", None) c["editor"] = editors.getEditor() return c
def get_context_data(self, **kwargs): # Needed since Django 1.9 because get_context_data is no longer called # with the form instance if 'form' not in kwargs: kwargs['form'] = self.get_form() kwargs = ArticleMixin.get_context_data(self, **kwargs) kwargs.update(FormView.get_context_data(self, **kwargs)) return kwargs
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['selected_tab'] = 'history' return kwargs
def get_context_data(self, **kwargs): kwargs['title'] = _( 'Preview Template: %s' ) % self.title kwargs['revision'] = None kwargs['content'] = self.template_content kwargs['preview'] = self.preview return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs["search_form"] = forms.SearchForm(self.request.GET) kwargs["query"] = self.query kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs["selected_tab"] = "attachments" return kwargs
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs['search_form'] = forms.SearchForm(self.request.GET) kwargs['query'] = self.query kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['selected_tab'] = 'template' return kwargs
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['selected_tab'] = 'history' if hasattr(site_settings,'PRIVATE_WIKI') and site_settings.PRIVATE_WIKI and self.request.user.is_anonymous(): raise Http404() return kwargs
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['selected_tab'] = 'view' article_context = ArticleMixin.get_context_data(self, **kwargs) descendants = article_context['urlpath'].root().get_descendants() descendants = [ descendant for descendant in descendants if descendant.article.can_read(self.request.user) ] article_context['descendants'] = descendants return article_context
def get_context_data(self, **kwargs): c = ArticleMixin.get_context_data(self, **kwargs) # Needed since Django 1.9 because get_context_data is no longer called # with the form instance if 'form' not in c: c['form'] = self.get_form() c['parent_urlpath'] = self.urlpath c['parent_article'] = self.article c['create_form'] = c.pop('form', None) c['editor'] = editors.getEditor() return c
def get_context_data(self, **kwargs): c = ArticleMixin.get_context_data(self, **kwargs) # Needed since Django 1.9 because get_context_data is no longer called # with the form instance if "form" not in c: c["form"] = self.get_form() c["parent_urlpath"] = self.urlpath c["parent_article"] = self.article c["create_form"] = c.pop("form", None) c["editor"] = editors.getEditor() return c
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["selected_tab"] = "view" article_context = ArticleMixin.get_context_data(self, **kwargs) descendants = article_context["urlpath"].root().get_descendants() descendants = [ descendant for descendant in descendants if descendant.article.can_read(self.request.user) ] article_context["descendants"] = descendants return article_context
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['selected_tab'] = 'history' # try: # TODO: remove # kwargs['metadataRevisions'] = SupersenseRevision.objects.all() # except: # pass return kwargs
def get_context_data(self, **kwargs): # Is this a bit of a hack? Use better inheritance? kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs['search_form'] = forms.SearchForm(self.request.GET) kwargs['query'] = self.query kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['selected_tab'] = 'attachments' if 'form' not in kwargs: kwargs['form'] = self.get_form() return kwargs
def get_context_data(self, **kwargs): try: models.SimpleMetadata.objects.get(article=Article.objects.get( urlpath=URLPath.objects.get(slug='supersenses'))) models.SimpleMetadata.objects.get(article=Article.objects.get( urlpath=URLPath.objects.get(slug='construals'))) kwargs['install'] = '' except (URLPath.DoesNotExist, Article.DoesNotExist, models.SimpleMetadata.DoesNotExist): kwargs['install'] = mark_safe( '<h2><a href="installmetadata">Install metadata</a></h2>') return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs_listview = ListView.get_context_data(self, **kwargs) kwargs.update(kwargs_article) kwargs.update(kwargs_listview) kwargs['filter_query'] = self.query kwargs['filter_form'] = self.filter_form # Update each child's ancestor cache so the lookups don't have # to be repeated. updated_children = kwargs[self.context_object_name] for child in updated_children: child.set_cached_ancestors_from_parent(self.urlpath) kwargs[self.context_object_name] = updated_children return kwargs
def get_context_data(self, **kwargs): kwargs['selected_tab'] = 'source' return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs.update(ArticleMixin.get_context_data(self, **kwargs)) return ListView.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs["title"] = self.title kwargs["revision"] = self.revision kwargs["content"] = self.content kwargs["preview"] = self.preview return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs['selected_tab'] = 'source' if hasattr(site_settings,'PRIVATE_WIKI') and site_settings.PRIVATE_WIKI and self.request.user.is_anonymous(): return '' return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs = ArticleMixin.get_context_data(self, **kwargs) kwargs.update(FormView.get_context_data(self, **kwargs)) return kwargs
def get_context_data(self, **kwargs): kwargs['selected_tab'] = 'attachments' return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs['selected_tab'] = 'attachments' if 'form' not in kwargs: kwargs['form'] = self.get_form() return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs["selected_tab"] = "attachments" if "form" not in kwargs: kwargs["form"] = self.get_form() return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs['title'] = self.title kwargs['revision'] = self.revision kwargs['content'] = self.content kwargs['preview'] = self.preview return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs["selected_tab"] = "attachments" return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs["selected_tab"] = "view" return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs['selected_tab'] = 'view' kwargs_article = ArticleMixin.get_context_data(self, **kwargs) kwargs.update(kwargs_article) return ArticleMixin.get_context_data(self, **kwargs)
def get_context_data(self, **kwargs): kwargs['path'] = '' return ArticleMixin.get_context_data(self, **kwargs)