Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
2337a249
Commit
2337a249
authored
Apr 15, 2018
by
Gabriel Detraz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #106
parent
d911452a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
preferences/templates/preferences/preferences.html
preferences/templates/preferences/preferences.html
+1
-1
preferences/views.py
preferences/views.py
+2
-2
re2o/settings.py
re2o/settings.py
+5
-1
re2o/templates/re2o/index.html
re2o/templates/re2o/index.html
+1
-1
No files found.
preferences/templates/preferences/preferences.html
View file @
2337a249
...
...
@@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
<form
class=
"form"
method=
"post"
>
<form
class=
"form"
method=
"post"
enctype=
"multipart/form-data"
>
{% csrf_token %}
{% if preferenceform %}
{% bootstrap_form preferenceform %}
...
...
preferences/views.py
View file @
2337a249
...
...
@@ -119,7 +119,7 @@ def edit_options(request, section):
@
can_create
(
Service
)
def
add_service
(
request
):
"""Ajout d'un service de la page d'accueil"""
service
=
ServiceForm
(
request
.
POST
or
None
)
service
=
ServiceForm
(
request
.
POST
or
None
,
request
.
FILES
or
None
)
if
service
.
is_valid
():
with
transaction
.
atomic
(),
reversion
.
create_revision
():
service
.
save
()
...
...
@@ -138,7 +138,7 @@ def add_service(request):
@
can_edit
(
Service
)
def
edit_service
(
request
,
service_instance
,
**
_kwargs
):
"""Edition des services affichés sur la page d'accueil"""
service
=
ServiceForm
(
request
.
POST
or
None
,
instance
=
service_instance
)
service
=
ServiceForm
(
request
.
POST
or
None
,
request
.
FILES
or
None
,
instance
=
service_instance
)
if
service
.
is_valid
():
with
transaction
.
atomic
(),
reversion
.
create_revision
():
service
.
save
()
...
...
re2o/settings.py
View file @
2337a249
...
...
@@ -155,7 +155,11 @@ BOOTSTRAP_BASE_URL = '/static/bootstrap/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
'static'
).
replace
(
'
\\
'
,
'/'
),
)
# Directory where the static files serverd by the server are stored
MEDIA_ROOT
=
'/var/www/re2o/media'
MEDIA_URL
=
'/media/'
STATIC_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'static_files'
)
# The URL to access the static files
STATIC_URL
=
'/static/'
...
...
re2o/templates/re2o/index.html
View file @
2337a249
...
...
@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% for service in service_list %}
<div
class=
"col-12"
>
<div
class=
"thumbnail"
>
<a
href=
"{{ service.url }}"
><img
src=
"{% static service.image %
}"
alt=
"{{ service.name }}"
></a>
<a
href=
"{{ service.url }}"
><img
src=
"{{ service.image.url }
}"
alt=
"{{ service.name }}"
></a>
<div
class=
"caption"
>
<h3>
{{ service.name }}
</h3>
<p>
{{ service.description }}
</p>
...
...
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