Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
42
Issues
42
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
dd16580f
Commit
dd16580f
authored
Aug 18, 2019
by
Théo Labetowiez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COM] Bug fix and remove last index
parent
9904f513
Pipeline
#1987
passed with stage
in 24 minutes and 45 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
24 deletions
+12
-24
com/migrations/0006_remove_sith_index_page.py
com/migrations/0006_remove_sith_index_page.py
+12
-0
com/models.py
com/models.py
+0
-1
com/tests.py
com/tests.py
+0
-5
com/urls.py
com/urls.py
+0
-1
com/views.py
com/views.py
+0
-8
core/templates/core/index.jinja
core/templates/core/index.jinja
+0
-9
No files found.
com/migrations/0006_remove_sith_index_page.py
0 → 100644
View file @
dd16580f
# -*- 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"
)]
com/models.py
View file @
dd16580f
...
...
@@ -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
):
...
...
com/tests.py
View file @
dd16580f
...
...
@@ -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"
))
...
...
com/urls.py
View file @
dd16580f
...
...
@@ -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
(),
...
...
com/views.py
View file @
dd16580f
...
...
@@ -182,14 +182,6 @@ class InfoMsgEditView(ComEditView):
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"
...
...
core/templates/core/index.jinja
deleted
100644 → 0
View file @
9904f513
{%
extends
"core/base.jinja"
%}
{%
block
title
%}
{%
trans
%}
Welcome!
{%
endtrans
%}
{%
endblock
%}
{%
block
content
%}
{{
get_sith
()
.
index_page
|
markdown
}}
{%
endblock
%}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment