Commit a1f954d8 authored by Théo Labetowiez's avatar Théo Labetowiez

[COM] Bug fix and remove last index

parent 9904f513
Pipeline #1969 failed with stage
in 24 minutes and 59 seconds
# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-08-18 17:00
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('com', '0005_auto_20180318_2227'),
]
operations = [
migrations.RemoveField(
model_name='sith',
name='index_page',
),
]
......@@ -45,7 +45,6 @@ class Sith(models.Model):
alert_msg = models.TextField(_("alert message"), default="", blank=True)
info_msg = models.TextField(_("info message"), default="", blank=True)
index_page = models.TextField(_("index page"), default="", blank=True)
weekmail_destinations = models.TextField(_("weekmail destinations"), default="")
def is_owned_by(self, user):
......
......@@ -78,11 +78,6 @@ class ComTest(TestCase):
in str(r.content)
)
def test_birthday_non_authenticated_user(self):
self.client.logout()
response = self.client.get(reverse("core:index"))
self.assertNotContains(response, text="""<div id="birthdays_content">""")
def test_birthday_non_subscribed_user(self):
self.client.login(username="guy", password="plop")
response = self.client.get(reverse("core:index"))
......
......@@ -30,7 +30,6 @@ from club.views import MailingDeleteView
urlpatterns = [
url(r"^sith/edit/alert$", AlertMsgEditView.as_view(), name="alert_edit"),
url(r"^sith/edit/info$", InfoMsgEditView.as_view(), name="info_edit"),
url(r"^sith/edit/index$", IndexEditView.as_view(), name="index_edit"),
url(
r"^sith/edit/weekmail_destinations$",
WeekmailDestinationEditView.as_view(),
......
......@@ -181,15 +181,6 @@ class InfoMsgEditView(ComEditView):
current_tab = "info"
success_url = reverse_lazy("com:info_edit")
class IndexEditView(ComEditView):
form_class = modelform_factory(
Sith, fields=["index_page"], widgets={"index_page": MarkdownInput}
)
current_tab = "index"
success_url = reverse_lazy("com:index_edit")
class WeekmailDestinationEditView(ComEditView):
fields = ["weekmail_destinations"]
current_tab = "weekmail_destinations"
......
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Welcome!{% endtrans %}
{% endblock %}
{% block content %}
{{ get_sith().index_page|markdown }}
{% endblock %}
# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-08-18 17:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('election', '0003_auto_20171202_1819'),
]
operations = [
migrations.AlterField(
model_name='role',
name='order',
field=models.PositiveIntegerField(db_index=True, editable=False, verbose_name='order'),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment