Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Django 1.8 compatibility #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions knowledge/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class QuestionManager(models.Manager):
# return super(QuestionManager, self).get_query_set(*args, **kwargs)

def can_view(self, user):
qs = super(QuestionManager, self).get_query_set()\
qs = super(QuestionManager, self).get_queryset()\
.select_related('user')

if user.is_staff or user.is_superuser:
Expand All @@ -27,7 +27,7 @@ class ResponseManager(models.Manager):
# .select_related('question', 'user')

def can_view(self, user):
qs = super(ResponseManager, self).get_query_set()\
qs = super(ResponseManager, self).get_queryset()\
.select_related('question', 'user')

if user.is_staff or user.is_superuser:
Expand Down
1 change: 0 additions & 1 deletion knowledge/templates/django_knowledge/ask.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends 'django_knowledge/inner.html' %}

{% load i18n %}
{% load url from future %}

{% block title %}{% trans "Ask a Question" %}{% endblock title %}

Expand Down
3 changes: 1 addition & 2 deletions knowledge/templates/django_knowledge/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load i18n %}
{% load url from future %}

<form {% if submit_url %}action="{{ submit_url }}"{% endif %} method="post" class="dk-form">
{% csrf_token %}
Expand All @@ -8,7 +7,7 @@
<div class="field-wrapper field-{{ field.html_name }}">
<div class="field-label">
<label for="id_{{ field.html_name }}">{{ field.label }}: {% if field.field.required %}<small><em class="quiet">({% trans "required" %})</em></small>{% endif %}</label>

{% if field.field.help_text %}
<br />
<small class="help-text">{{ field.field.help_text }}</small>
Expand Down
1 change: 0 additions & 1 deletion knowledge/templates/django_knowledge/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends 'django_knowledge/inner.html' %}

{% load i18n %}
{% load url from future %}

{% block title %}{% trans "Support" %}{% endblock title %}

Expand Down
5 changes: 2 additions & 3 deletions knowledge/templates/django_knowledge/inner.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{% extends BASE_TEMPLATE|default:'django_knowledge/base.html' %}

{% load i18n %}
{% load url from future %}

{% block knowledge_inner %}

<div class="dk-inner">

{% include "django_knowledge/welcome.html" %}

<div class="dk-search">
Expand All @@ -18,7 +17,7 @@

<div class="dk-content">
{% block knowledge_widgets %}

{% endblock knowledge_widgets %}
</div>

Expand Down
3 changes: 1 addition & 2 deletions knowledge/templates/django_knowledge/list.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends 'django_knowledge/inner.html' %}

{% load i18n %}
{% load url from future %}

{% load knowledge_tags %}

Expand All @@ -20,7 +19,7 @@ <h3>Showing {{ counter }} results{% if search %} for <em>{{ search }}</em>{% end
{% if not questions.paginator.count %}
<p class="center"><em>{% trans "No results found." %}</em></p>
{% endif %}

<hr class="light"/>

<div class="center">
Expand Down
2 changes: 0 additions & 2 deletions knowledge/templates/django_knowledge/mod_bar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% load url from future %}

{% if request.user.is_staff %}
<div class="dk-mod-bar">
{% for mod in allowed_mods %}
Expand Down
1 change: 0 additions & 1 deletion knowledge/templates/django_knowledge/question_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load i18n %}
{% load url from future %}

<ol class="question-list">
{% for question in questions %}
Expand Down
3 changes: 1 addition & 2 deletions knowledge/templates/django_knowledge/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load i18n %}
{% load url from future %}

{% if my_questions %}

Expand All @@ -13,7 +12,7 @@ <h4>{% trans "My Questions" %}</h4>
</ul>

<br />

{% endif %}

<h4>{% trans "Categories" %}</h4>
Expand Down
5 changes: 2 additions & 3 deletions knowledge/templates/django_knowledge/thread.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% load i18n %}
{% load markup %}
{% load knowledge_tags %}
{% load url from future %}

{% block title %}{{ question.title }}{% endblock title %}

Expand Down Expand Up @@ -58,9 +57,9 @@ <h5>{{ response.get_name }} <span class="quiet">
{% endfor %}


<br/>
<br/>
<hr class="light"/>
<br/>
<br/>


{% if form %}
Expand Down
1 change: 0 additions & 1 deletion knowledge/templates/django_knowledge/welcome.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load i18n %}
{% load url from future %}

<div class="dk-roof">
<h2 class="primary"><a href="{% url "knowledge_index" %}">{% trans "Welcome to our Support Center." %}</a></h2>
Expand Down