Skip to content
Snippets Groups Projects
Commit d458ad03 authored by Julian's avatar Julian
Browse files

Apply requested changes from @hansegucker (PART 2)

parent aa142aab
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -9,6 +9,6 @@ class QuestionAdmin(admin.ModelAdmin):
admin.site.register(Question, QuestionAdmin)
class FAQQuestionAdmin(admin.ModelAdmin):
list_display = ("question_text", "icon", "answered")
list_display = ("question_text", "icon", "show")
admin.site.register(FAQQuestion, FAQQuestionAdmin)
\ No newline at end of file
# Generated by Django 2.2 on 2019-05-01 12:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('faq', '0005_auto_20190429_2121'),
]
operations = [
migrations.RemoveField(
model_name='faqquestion',
name='answered',
),
migrations.AddField(
model_name='faqquestion',
name='show',
field=models.BooleanField(default=False, verbose_name='Veröffentlicht'),
),
]
......@@ -6,7 +6,7 @@ class FAQQuestion(models.Model):
question_text = models.TextField()
icon = models.CharField(max_length=20, blank=True, default="question_answer")
answered = models.BooleanField(verbose_name="Beantwortet", default=False)
show = models.BooleanField(verbose_name="Veröffentlicht", default=False)
answer_text = models.TextField(blank=True)
def __str__(self):
......
......@@ -15,7 +15,7 @@ def create_info(text):
def faq(request):
""" Shows the FAQ site, also if not logged in"""
context = {
"questions": FAQQuestion.objects.filter(answered=True),
"questions": FAQQuestion.objects.filter(show=True),
}
return render(request, 'faq/faq.html', context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment